Google+ Platform for Android
Google+ Platform for Android is now part of Google Sign-In. You need to add Google Sign-In to use Google+ in your app. This enables the use of the public profile and social graph to welcome the users by name, display their pictures, or connect with friends.
Create a GoogleApiClient
object to access the API and use the Sign-In feature. Add the Google+ API by indicating the key Plus.API
and these two scopes: Scopes.PLUS_LOGIN
and Scopes.PLUS_ME
, like in the following code:
GoogleApiClient gac = new GoogleApiClient.Builder(this) .enableAutoManage(this, this) .addApi(Plus.API) .addScope(Scopes.PLUS_LOGIN) .addScope(Scopes.PLUS_ME) .build();
The PlusShare
class includes resources in posts shared on Google+. The PlusOneButton
class implements a +1 button to recommend a URL on Google+. The available sizes for the +1 button are small, medium, tall, or standard. Add it to a layout using the following code:
<com.google.android.gms...