通过Facebook中未显示的意图文本分享时
Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.putExtra(android.content.Intent.EXTRA_TEXT, "HELOO WORLD");
sendIntent.setType("text/plain");
startActivity(Intent.createChooser(sendIntent, "Share with"));;
答案 0 :(得分:12)
这是根据Facebook设计的。从this Facebook developers bug report(需要登录Facebook登录):
Jesse Chen··Facebook的软件工程师 嗨Facebook开发者,
此问题将由设计关闭,因为我们的API不支持为用户预填充消息,如平台策略IV.2下的此处的策略文档(https://developers.facebook.com/docs/guides/policy/application_integration_points/)中所示。
2012年8月13日
注意:上面提供的链接已被破坏; Facebook平台政策的当前链接在这里:https://developers.facebook.com/policy/#integration(强调添加):
IV。应用程序集成点
- [...]
- 您不得预先填写与以下产品相关联的任何字段,除非用户先前在工作流程中手动生成内容:流故事(Facebook.streamPublish和FB的user_message参数)。 Connect.streamPublish和stream.publish的消息参数),照片(标题),视频(描述),Notes(标题和内容),链接(评论)和Jabber / XMPP。
醇>
因此,Facebook应用程序只是强制执行此操作 - 如果您尝试与预先填写的文本共享内容,Facebook不知道它是由用户编写还是由应用程序填写,因此不做任何假设,忽略该文本,并要求用户编写文本。