通过意向文本安卓分享到Facebook未显示意向、文本安、Facebook

2023-09-05 11:30:30 作者:搁浅°

在分享通过意向书文本在Facebook中未显示

 意图sendIntent =新意图();
            sendIntent.setAction(Intent.ACTION_SEND);
            sendIntent.putExtra(android.content.Intent.EXTRA_TEXTHELOO WORLD);
            sendIntent.setType(text / plain的);
            startActivity(Intent.createChooser(sendIntent,分享));;
 

解决方案 文本自定义下载安卓最新版 手机app官方版免费安装下载 豌豆荚

这是有意设计的,根据Facebook的。从这个Facebook的开发人员的错误报告(需要查看Facebook登录):

  

杰西·陈··Facebook的软件工程师   嗨Facebook的开发者,

     

这个问题是要通过设计可以关闭,因为我们的API不支持pre-填补了网友的留言,在我们的政策文件在这里看到(https://developers.facebook.com/docs/guides/policy/application_integration_points/)在平台策略.2。

     

2012年8月13日

注:以上所提供的链接已断开;当前链接,Facebook的平台策略是在这里:https://developers.facebook.com/policy/#integration (强调):

  

四。应用集成点

         [...]    您不能pre-填充任何以下产品相关的领域,除非用户手动生成的内容先前在流程:流层(user_message数据参数Facebook.streamPublish和FB.Connect.streamPublish,以及stream.publish消息参数),照片(标题),视频(说明),备注(标题和内容),链接(评论),和Jabber / XMPP。   

因此​​,Facebook的应用程序仅仅是执行此,如果你试图分享一下pre-填写的文字,Facebook的不知道这是否是由用户或应用程序填写,所以它使没有假设,忽略该文本,并且要求用户书写的文本。

When Share via Intent Text not Shown in 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"));;

解决方案

This is as designed, according to Facebook. From this Facebook developers bug report (Facebook login required to view):

Jesse Chen · · Software Engineer at Facebook Hi Facebook Developers,

This issue is going to be closed by design because our API does not support pre-filling the message for users as seen in our Policy Documentation here (https://developers.facebook.com/docs/guides/policy/application_integration_points/) under Platform Policy IV.2.

August 13, 2012

Note: The link provided above is broken; the current link for Facebook's Platform Policy is here: https://developers.facebook.com/policy/#integration (emphasis added):

IV. Application Integration Points

[...] You must not pre-fill any of the fields associated with the following products, unless the user manually generated the content earlier in the workflow: Stream stories (user_message parameter for Facebook.streamPublish and FB.Connect.streamPublish, and message parameter for stream.publish), Photos (caption), Videos (description), Notes (title and content), Links (comment), and Jabber/XMPP.

So the Facebook app is just enforcing this—if you try to share something with pre-filled in text, Facebook doesn't know if it was written by the user or filled in by the app, so it makes no assumptions, ignores that text, and requires the user to write the text.