在Android中使用意图分享给Facebook [英] share using intent to facebook in android
问题描述
我使用以下代码来共享内容
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"));
除了 Facebook 之外,电子邮件,短信和其他功能都可以。
我谷歌的原因,似乎这是Facebook自4月以来的错误,但不幸的是没有人修复它。
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.
然而,我发现很多应用仍然可以使用意图选择器成功地调用Facebook,如Google阅读器。他们怎么做?
据我所知,我们可以使用Facebook API,但他们如何知道用户在选择器中选择Facebook并调用Facebook API?
As I know, we can use Facebook API, but how they can know user choose facebook in the chooser and invoke the facebook API?
推荐答案
根据bug追踪器的最新更新,这是按设计,错误已经关闭。
https://developers.facebook.com/bugs/332619626816423/
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..
这篇关于在Android中使用意图分享给Facebook的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!