簡體   English   中英

使用 Android 應用程序進行 Google+ 共享

[英]Google+ sharing using Android application

需要在 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

請幫忙..

盡管在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+ 應用程序,那么它會顯示所有這些應用程序,用戶可以選擇分享給哪些應用程序。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM