android - 如何在android中添加分享按钮?

标签 android facebook twitter

<分区>

Possible Duplicate:
Android facebook/twitter share button

我正在创建一个应用程序,我想在其中添加共享按钮,单击该按钮我的应用程序可以在 facebook 和 twitter 上共享。如果有人有我可以实现的合适答案,请告诉我。非常感谢您的回答。

最佳答案

Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setType("text/plain");
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, getResources().getString(R.string.recommendation_subject));
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, getResources().getString(R.string.recommendation_body));
startActivity(emailIntent);

将提示用户选择适当的应用程序来执行操作 (从安装在手机上)

关于android - 如何在android中添加分享按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5561877/

相关文章:

android - 设置默认时区以用于 Android 应用程序

php - 多平台 - 在 Facebook 上发布到好友时间线并发送邀请

jquery - Facebook 点赞框 : changing the width by jQuery

ios - Swift 中来自两个不同 JSON 的数据放入同一结构中

java - 即使禁用了滑动,选项卡仍会随着 TabLayout 上的触摸移动而更改

android - Android-避免AlertDialog关闭(错误处理)

hadoop - 无法识别配置单元中的列名称或主键或外键中 'user' 'STRUCT' '<' 附近的输入

php - 如何使用 twitter api v 1.1 查找用户的推文总数?

android - 从大型 XML 填充 ListView

.net - Facebook Canvas POST ASP.net