1

I have a share button, which when clicked I want to open a share windows, so the user can share this text in social networks. The problem is facebook, it is not accepting the EXTRA_TEXT passed onto the intent

Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
                sharingIntent.setType("text/plain");
                String shareBody = "Here is the share content body";
                sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "Subject Here");
                sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
                startActivity(Intent.createChooser(sharingIntent, "Share via"));

every other share option (twitter, tumblr...) works fine, just facebook is giving problems... How can I solve this without having to create a whole new class with facebook sdk just for this purpose??

Sartheris Stormhammer
  • 2,534
  • 8
  • 37
  • 81

2 Answers2

2

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

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

  • can I at least make a "shared via MyApp" at the end of the post? – Sartheris Stormhammer Aug 20 '14 at 11:01
  • 1
    They should remove ACTION_SEND intent filter from their manifest if they don't want predefined texts to be posted. What if my app wants to post a photo with a description(which user already added in my app, So asking the user to retype the same is very bad). – Seshu Vinay Aug 20 '14 at 11:02
1

You cant Share Text in Facebook as Facebook discards it and asks you in its application to write the text like what in your mind.

see this report

Android and Facebook share intent

Community
  • 1
  • 1
Jamil
  • 5,457
  • 4
  • 26
  • 29