M-D
M-D

Reputation: 21

Access google+ user profile ID

I need to access job title from Google+ profiles and I can do it with specific id.
but I want to access about 100 profiles and read their job titles without any user id.
how can I do it??

Upvotes: 0

Views: 230

Answers (1)

class
class

Reputation: 8681

You could use the plus.people.search API to search for people to get their ids then could get their profile.

In JavaScript:

gapi.client.plus.people.search(
  { query: 'Gus', 
    fields: 'items/id'
  }).execute(
      function(resp){
        for (var i=0; i < resp.items.length; i++){
          gapi.client.plus.people.get(
            { userId: resp.items[i].id, 
              fields: 'displayName,organizations(title)'}).execute(
                function(resp){
                  console.log(resp)
                });
        }
      });

Upvotes: 1

Related Questions