开发者

Facebook Android Intent

i have a problem with this intent. this intent is supose to send a text type of message. everything works email,sms,twitter and whatever is on the phone. but the only one that has a problem is facebook, it will try to post as a link and not a text.

Intent s = new Intent(android.content.Intent.ACTION_SEND);

  s.setType("text/plain");开发者_StackOverflow
  s.putExtra(Intent.EXTRA_SUBJECT, "Quote");
  s.putExtra(Intent.EXTRA_TEXT, qoute);

  startActivity(Intent.createChooser(s, "Quote"));


This is a flaw in the Facebook application. Please complain to the authors of that application, and hopefully they will fix their bug.


Facebook have decided that this is not a bug, but that's it's by design; i.e. pre-filling the Facebook app's share Intent with text is against their platform policy.

I think it was initially a bug, then they fixed it, then they removed the fix to conform to their policy.

More information:

  • https://developers.facebook.com/bugs/332619626816423
  • https://developers.facebook.com/policy/#control ("Give people control", point 3)

The fact that they advertise their share Intent as supporting EXTRA_TEXT is pretty frustrating, given they they don't really support it unless the text consists of a URL.

Note that it's perfectly possible to pre-fill the text using the Facebook share controller that's built-in to iOS 6 and higher - I guess Apple play by different rules.

Madness? I agree. My solution to this problem would be to delete my Facebook account, then go have a nice cup o' tea :) Alternatively, ignore Facebook's policy, and roll your own sharing UI that talks directly to the Facebook API.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜