Through this example I am able to integrate Google+ with android and to fetch my information like user id, url, profile name and profile picture.
I want also to fetch t
This can be done using google plus api. Though you can not get full profile information of every friend in one request, it will give you at least following information
To get profile information further you have to fetch each friend's profile information separately.
Given below is the code to fetch friends list
mPlusClient.loadPeople(new OnPeopleLoadedListener()
{
@Override
public void onPeopleLoaded(ConnectionResult status, PersonBuffer personBuffer, String nextPageToken)
{
if ( ConnectionResult.SUCCESS == status.getErrorCode() )
{
Log.v(TAG, "Fetched the list of friends");
for ( Person p : personBuffer )
{
Log.v(TAG, p.getDisplayName());
}
}
}
}, Person.Collection.VISIBLE); // VISIBLE=0
}
"for-loop" in the callback is there to iterate over each "Person" object.
Now to get further profile information you can use following snippet of code
mPlusClient.loadPerson(new OnPersonLoadedListener()
{
@Override
public void onPersonLoaded(ConnectionResult status, Person person)
{
if ( ConnectionResult.SUCCESS == status.getErrorCode())
{
Log.v(TAG, person.toString());
}
}
}, "me"); // Instead of "me" use id of the user whose profile information you are willing to get.
For further clarity please take a look at this link https://developers.google.com/+/mobile/android/people
There is not currently an API method exposed to list friends of a G+ user.
You can learn more about what methods are exposed here: https://developers.google.com/+/api/