从android意图问题分享到Facebook

时间:2014-02-12 01:20:48

标签: java android facebook android-intent

虽然我已经成功地将字符串分享给其他应用程序,例如电子邮件..但Facebook存在问题......

这是我的代码:

 private void sharePost() {

Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_TEXT, dataSecContent);
shareIntent.setType("text/plain");
startActivity(Intent.createChooser(shareIntent,
        getString(R.string.share_chooser_title)));
 }

这是我唯一得到的......没有任何字符串或任何......

facebook share

我在做错了什么?我已尝试使用uri发送URL并成功共享..但不是字符串..

1 个答案:

答案 0 :(得分:0)

Facebook无法处理EXTRA_TEXT字段。从这个bug report page询问为什么“...... Facebook Android应用程序无法接受EXTRA_SUBJECT和EXTRA_TEXT字段”,答案是:

“...我们的API不支持为用户预先填写消息,如平台策略IV.2下的我们的策略文档(https://developers.facebook.com/docs/guides/policy/application_integration_points/)所示。”