问题描述
我正在开发一个Android应用,并且有兴趣知道如何使用Android的共享内容从应用内更新应用用户的状态。
I'm developing an Android app and am interested to know how you can update the app user's status from within the app using Android's share intents.
Facebook的SDK似乎很容易做到,但是我很想让用户通过普通的Share Intent弹出窗口进行操作看到这里:
Having looked through Facebook's SDK it appears that this is easy enough to do, however I'm keen to allow the user to do it via the regular Share Intent pop up window? seen here:
我尝试过通常的分享意图代码,但这不再适用于Facebook。
I have tried the usual share intent code, however this no longer appears to work for Facebook.
public void invokeShare(Activity activity, String quote, String credit) {
Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, activity.getString(R.string.share_subject));
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, "Example text");
activity.startActivity(Intent.createChooser(shareIntent, activity.getString(R.string.share_title)));
}
更新:
做了更多的挖掘,看起来好像是Facebook的应用程序的错误尚未解决! ()同时,它看起来像我只是要忍受负面的分享不起作用!!!评论。欢呼Facebook:*(
UPDATE:Having done more digging, it looks as though it's a bug with Facebook's app that has yet to be resolved! (facebook bug) For the mean time it looks like I'm just going to have to put up with the negative "Sharing doesn't work!!!" reviews. Cheers Facebook :*(
推荐答案
是错误链接:
感谢@billynomates:
Thanks @billynomates:
这篇关于Android和Facebook分享意图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!