duypeng
duypeng

Reputation: 11

How to share text to news feed of the facebook in flutter

I use social_share package but only share to story of the facebook. How to share text to news feed of the facebook? Thanks!

Share newsfeed facebook

Upvotes: 1

Views: 981

Answers (1)

Gursewak Singh
Gursewak Singh

Reputation: 1978

I used esys_flutter_share to share the text and photos to news feed and story of the Facebook. Check below how it's working.

Share Text

Share.text('my text title', 'This is my text to share with other applications.', 'text/plain'); 

Share Photo

final ByteData bytes = await rootBundle.load('assets/image1.png');
await Share.file('esys image', 'esys.png', bytes.buffer.asUint8List(), 'image/png', text: 'My optional text.');

Might it will be help you.

Upvotes: 1

Related Questions