6

I use the following code to share content

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, "The status update text");
startActivity(Intent.createChooser(intent, "Dialog title text"));

It is OK for email, sms and whatever except Facebook. I google the reason and it seems that it is a bug of facebook since April but unfortunately no one fixes it.

However, I find that many app can still use intent chooser to invoke Facebook successfully such as Google reader. How can they do it?

As I know, we can use Facebook API, but how they can know user choose facebook in the chooser and invoke the facebook API?

Bear
  • 5,138
  • 5
  • 50
  • 80
  • Check your facebook app version. and this [thread](http://stackoverflow.com/questions/3515198/share-text-on-facebook-from-android-app-via-action-send) – st0le Dec 28 '11 at 04:41
  • 1
    I have the most updated version of facebook app... As the thread you mentioned, I can just share link but not text... thx – Bear Dec 28 '11 at 05:43

2 Answers2

7

According to the latest updating to the bug tracker this is 'By Design' and the bug has been closed. https://developers.facebook.com/bugs/332619626816423/

So looks like this isn't going to be possible via intents..

crazyfool
  • 1,433
  • 4
  • 22
  • 38
  • I am looking for the same answer and its still possible as I just did its testing in Pixlr Express.."https://play.google.com/store/apps/details?id=com.pixlr.express" – Name is Nilay Nov 08 '13 at 16:09
0

You could only send pure URL to facebook. It should be a bug on facebook App.

For more detailed information, refer to the following post

Share Text on Facebook from Android App via ACTION_SEND


Someone has posted this issue to official facebook bug tracker, but it's still not solved yet.

Bug 16728 - Android ACTION_SEND is not handled correctly

Community
  • 1
  • 1
dong221
  • 3,390
  • 6
  • 29
  • 31