I am working with google + getting friends. I can successfully log in and get my credentials. But when I use mPlusClient.loadPeople(this, "me");, the return of
@Override
public void onPeopleLoaded(ConnectionResult status, PersonBuffer personBuffer, String nextPageToken) {
switch (status.getErrorCode()) {
case ConnectionResult.SUCCESS:
try {
int count = personBuffer.getCount();
Log.e("", "count : " + count);
for (int i = 0; i < count; i++) {
Log.e("NAME", "" + personBuffer.get(i).getDisplayName());
}
} finally {
personBuffer.close();
}
break;
case ConnectionResult.SIGN_IN_REQUIRED:
mPlusClient.disconnect();
mPlusClient.connect();
break;
default:
Log.e("TAG", "Error when listing people: " + status);
break;
}
}
is only the details of the logged in user. Now what I what to achieve is to get the list of my friends. I tried using
mPlusClient.loadPeople(MainActivity.this, Person.Collection.Visible);
but it says "Collection cannot be resolved or is not a field". Any help would be highly appreciated. Thank you.
This link somehow helped me to feftch the members of my circle in google plus.
solved the problem. People.Collection.VISIBLE is not already working. I do not know why.
Looks like you're after the PlusClient.loadVisiblePeople method.
You can see an example of the response using Web API explorer.