分享文字和网址在Facebook上 [英] Share text and URL on Facebook
问题描述
我想分享一个消息,如退房的图像 http://someUrl.com 从应用程序共享< STRONG> ABCapp </ strong>即可。用户必须能够选择任何安装的应用程序与分享。
我使用下面的code
I want to share a message such as " Check out the image http://someUrl.com Shared from app ABCapp. The user must be able to choose any of the installed applications to share with. I am using the following code
Intent intent = new Intent(android.content.Intent.ACTION_SEND);
intent.setType("text/plain");
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
intent.putExtra(Intent.EXTRA_TEXT, shareMsg);
startActivity(Intent.createChooser(intent,
getString(R.string.share_using_application)));
它工作正常的比Facebook以外的所有其他应用程序。我看了这表明使用Facebook SDK的一些其他问题。我不是很清楚什么我应该使用FB SDK的?我想显示对股票期权的点击应用程序列表中,以后我应该如果用户选择FB采取不同的做法?可以在用户的选择来检测?请解释。
It works fine for all other applications other than facebook. I have read some other questions which suggest to use facebook sdk. I am not very clear with what am I supposed to use fb sdk for? I want the list of applications to be shown on click of share option, after that am i supposed to take a different approach if user selects FB? Can the user's selection be detected? Please explain.
推荐答案
您需要使用的 Facebook的Android SDK中或实易Android SDK中分享。
这篇关于分享文字和网址在Facebook上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!