例如我想分享这个链接:
http://www.orientaldaily.com.my/index.php?option=com_k2&view=item&id=6780:&Itemid=198
这是代码
private void shareIt() {
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
String shareBody = "Here is the share content body";
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,
"Subject Here");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
startActivity(Intent.createChooser(sharingIntent, "Share via"));
}
所以,
1) 如何让它分享到 facebook 的链接?
2) 如何编辑分享列表?
最佳答案
一旦您使用 createChooser()
将文本交给系统,它就不再由您掌控。
- 这取决于用户的选择,他们选择通过何种方式 (app/source) 共享。
- 您不能更改共享应用程序列表。 (由系统管理)
关于android - 如何开发分享按钮来分享链接?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10381677/