简体   繁体   English

使用 Android 应用程序进行 Google+ 共享

[英]Google+ sharing using Android application

Need to share our application in all social site like Facebook,Twitter,google+ ..Using Share auth api we can share in Facebook and Twitter.需要在 Facebook、Twitter、google+ 等所有社交网站上共享我们的应用程序。使用 Share auth api,我们可以在 Facebook 和 Twitter 上共享。

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

Not able to share in google+ ,is there any plugin available?无法在 google+ 中分享,是否有可用的插件?

Now am using this sample program,not able to share using this.现在正在使用此示例程序,无法共享使用此程序。

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

Please help..请帮忙..

Google plus does not have a publicly available API yet although there are some options available at https://developers.google.com/+/mobile/android/尽管在https://developers.google.com/+/mobile/android/ 上提供了一些选项,但 Google plus 还没有公开可用的 API

I would highly recommend not to use a unique SDK for each social network since they contain a lot of bugs, and are not very reliable.我强烈建议不要为每个社交网络使用唯一的 SDK,因为它们包含很多错误,并且不是很可靠。

If you just want to share simple text from your app to Facebook,Twitter,Google+ and so on... I would recommend to create a chooser to let the user pick which app from his phone he wants to user for sharing.如果您只想将应用程序中的简单文本共享到 Facebook、Twitter、Google+ 等...我建议创建一个选择器,让用户从他的手机中选择他希望用户共享的应用程序。 It is simple, reliable and this is how it's usually done in android.它简单、可靠,这就是通常在 android 中完成的方式。

Sample code :示例代码:

        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..."));

This will display to the user, all the apps that are capable of sharing a text post.这将向用户显示所有能够共享文本帖子的应用程序。 If the user has facebook, twitter and google+ apps in his/her phone, then it will show all of them and the user can choose which ones to share to.如果用户在他/她的手机中有 facebook、twitter 和 google+ 应用程序,那么它会显示所有这些应用程序,用户可以选择分享给哪些应用程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM