android - 是否有用于社交网络的一体化图书馆

标签 android facebook

我正在尝试实现从我的 Android 应用程序发布到多个社交网络(Facebook、Twitter...)的可能性,而不是一个一个地检查 API,我想知道是否存在允许允许的免费库我只需一个链接和简单的调用即可完成。

我搜索了旧问题,但是像 SocialLib 这样的解决方案已经完全从互联网上消失了,而其他解决方案则从 libs 变成了付费服务。

最佳答案

Android 中的 Share api 怎么样:

//create the send intent
Intent shareIntent = Intent(android.content.Intent.ACTION_SEND);

//set the type
shareIntent.setType("text/plain");

//add a subject
shareIntent.putExtra(android.content.Intent.EXTRA_SUBJECT,  "Insert Subject Here");

//build the body of the message to be shared
String shareMessage = "Insert message body here.";

//add the message
shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareMessage);

//start the chooser for sharing
startActivity(Intent.createChooser(shareIntent, "Insert share chooser title here"));

你会得到这个弹出窗口: http://4.bp.blogspot.com/-gn8nnLC70Xc/TrFoY1GxKtI/AAAAAAAAAEI/6UDPHv-Zxv8/s1600/sharelist.png

关于android - 是否有用于社交网络的一体化图书馆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10584359/

相关文章:

android - Android 中应用程序之间的 LED 通知优先级

android - 使用 AppBarLayout 在 CoordinatorLayout 中滚动时显示/隐藏 BottomNavigationView

javascript - 如何自定义 FACEBOOK 对话框?

php - facebook 为页面创建应用程序以将照片上传到页面的相册

html - IE9 Facebook 点赞按钮 红色

android - 将.aar文件输出到其他应用程序项目的libs目录

java - GridView 的 Adapter 中的元素编号错误

java - 什么可能导致 Android 上的 DatagramChannel connect() 调用中出现间歇性 'Permissions Denied' 错误?

ios - 将 XMPP 消息元素发送到多个目的地(Facebook Chat API)

c# - ASP.NET 从内容页面更改 facebook og 属性