【问题标题】:Google+ sharing using Android application使用 Android 应用程序进行 Google+ 共享
【发布时间】:2012-11-28 04:15:29
【问题描述】:

需要在 Facebook、Twitter、google+ 等所有社交网站上分享我们的应用程序。使用 Share auth api 我们可以在 Facebook 和 Twitter 上分享。

共享身份验证 API: http://code.google.com/p/socialauth-android/wiki/GettingStarted

无法在 google+ 中分享,有没有可用的插件?

现在正在使用这个示例程序,无法使用它分享。

https://github.com/imellon/Google-Plus-Android-Sample

请帮忙..

【问题讨论】:

    标签: android


    【解决方案1】:

    尽管https://developers.google.com/+/mobile/android/ 提供了一些选项,但Google plus 还没有公开可用的 API

    我强烈建议不要为每个社交网络使用唯一的 SDK,因为它们包含很多错误,而且不是很可靠。

    如果您只想将简单文本从您的应用程序分享到 Facebook、Twitter、Google+ 等...我建议创建一个选择器,让用户从他的手机中选择他想要共享的应用程序。它简单、可靠,这就是它通常在 android 中完成的方式。

    示例代码:

            Intent shareIntent=new Intent(Intent.ACTION_SEND);
            shareIntent.setType("text/plain");
            shareIntent.putExtra(Intent.EXTRA_TEXT,"your text here");
            shareIntent.putExtra(Intent.EXTRA_SUBJECT, "post title");
            startActivity(Intent.createChooser(shareIntent, "Share..."));
    

    这将向用户显示所有能够共享文本帖子的应用。如果用户在他/她的手机中有 facebook、twitter 和 google+ 应用程序,那么它将显示所有这些应用程序,并且用户可以选择要分享到哪些应用程序。

    【讨论】:

      【解决方案2】:
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多