android - 如何将 facebook、twitter 和 google plus 集成到 android 应用程序

标签 android facebook twitter integration social-networking

我喜欢将 Facebook、twitter 和 Google plus 集成到我的应用程序中,这样用户就可以使用该应用程序更新他们的状态。因此,我想知道如何做到这一点。

谢谢

最佳答案

我强烈建议不要使用这些 SDK,因为它们包含很多错误,而且据我所知不是很可靠。

如果您只想将应用中的简单文本分享到 Facebook 或 Twitter 等...我建议创建一个选择器,让用户从他的手机中选择他想要分享给用户的应用。它更简单、更可靠,而且更像“android 方式”。

这是您必须编写的代码:

Intent shareIntent=new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Intent.EXTRA_TEXT,"I want to share this with you!");
shareIntent.putExtra(Intent.EXTRA_SUBJECT, "Great Post");
startActivity(Intent.createChooser(shareIntent, "Share..."));

关于android - 如何将 facebook、twitter 和 google plus 集成到 android 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6869938/

相关文章:

Twitter oauth 请求 token 响应代码 401

android - 如何更改 Flutter 应用程序的名称?

python - time.strptime() 和 python-twitter 错误

android - Dagger2 androidTest 错误重复条目 : javax/annotation/Generated. 类

ios - 任何与 Facebook iOS SDK 解除好友关系的方法

python - 将深层嵌套的 json 从 facebook 转换为 python 中的数据框

c# - 在 C# 中保护 Facebook API secret

java - 使用 twitter4j 从 twitter 获取视频 url

android - 无法解析 Android Studio 上的符号 webView

android - 在 React Native 中调试应用程序崩溃