-1

String message = "Text I want to share.";

    Intent share = new Intent(Intent.ACTION_SEND);

    share.setType("text/plain");

    share.putExtra(Intent.EXTRA_TEXT, message);

    startActivity(Intent.createChooser(share, "Title of the dialog the system will open"));
  • 3
    Possible duplicate of [Android and Facebook share intent](http://stackoverflow.com/questions/7545254/android-and-facebook-share-intent) – Abhishek Singh Apr 12 '17 at 06:16

3 Answers3

1

The Facebook application does not handle either the EXTRA_SUBJECT or EXTRA_TEXT fields.

Please see link: https://developers.facebook.com/bugs/332619626816423

Jitesh Mohite
  • 31,138
  • 12
  • 157
  • 147
0

There is no way you can share Text alone in the Facebook using android shareIntent,It is possible only through Facebook SDK using share links functions.

Facebook simply ignores the Extra Text from the intent if there is an image. You can share image, but it does not allow you to share the Text content.The Facebook sharing intent can only take a single URL with prefixed http:// and no additional text message.

If you trying to share url with share intent you can do it without Facebook SDK even if you try with SDK you can't share prefilled text in facebook share dialog according to facebook content share policy.

Here is bug link: https://developers.facebook.com/bugs/332619626816423

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Karan Mavadhiya
  • 1,042
  • 8
  • 23
0

Only text sharing is possible through Facebook SDK using share links functions. There is no way you can share Text alone in the Facebook using android shareIntent.

You can share Image and URL using shareIntent but you can not share only text in Facebook without SDK.

Here is bug link: https://developers.facebook.com/bugs/332619626816423

It is possible only through Facebook SDK using share links functions.

Chetan Pushpad
  • 345
  • 1
  • 9