Reputation: 13734
I tried searching google and stackoverflow, but didn't found any such way!!
Is there something, some means in the google+ API using which I can get the number of circles (public information) for a particular profile, for which I have the g+ id ?
I went through that, all I found was, one can get the public information for a profile, only when that user has authenticated the app.
Although in the graph-api for FB, AFAIR we can get such public information (about posts, pages) without actually asking for permission.
I've updated my question, if you guys still think that it doesn't conform to the stackoverflow community, leave me a comment and I'll delete it, instead of giving negative votes. (friendly request)
[edit]
The idea is not to get the number of circles for a particular user, but to the get the number of circles in which is the user.
For e.g. https://plus.google.com/u/0/117907144223534027934 - I am in 353 circles https://plus.google.com/u/0/118337805761123404690 - he is in 15 circles
Upvotes: 0
Views: 1777
Reputation: 2176
The number of circles a person has is not actually public information. Google+ does not expose a user's circle structure in any way. However, if it has been shared publicly, you can retrieve the number of people that have circled a user. That is, the total number of people who have added that user to one of their circles. This is returned as the circledByCount
part of the Person resource that comes from a people.get API call.
If you are using Google+ Sign-In, you can also retrieve a list of people that your user has circled through the people.list API call. This is not a count, but rather the list of names and IDs of the people that the user has added to one of their circles. What is important here is that the API will not surface any information about the user's circle structure, meaning that the list you get back is a flat list of users. Also, the authenticated user that you are calling on behalf of can edit the list of people your app will see when they authenticate your app.
Upvotes: 3