Get Google Plus Followers Count Using API

One of my friend ask me about such problem, actually he want to total count of his Google plus followers and want ot manual display according to it.

Let's make it simple, get google plus follower count using API in text-

Go to Google Developers Console  and Create Project and fill required details create project.

Click the created project to go to its dashboard, and click on Use Google API and select Credentials from left menu as below Images.

google developer console create project

and

Create google developer API

After that click on OAuth Screen and fill required details.
Now you can able to create Credentials after clicking on it.
Select Service Account Key and generate key.

google developer console create API

Now copy API key and proceed for below step.

Use below JQuery API to get details of G+ account and followers count.

var profileid = '110700693786942896145';
 var apikey = 'AIzaSyAqlZ1MJSGXMSs8q5WbfvLpZTGJeHLVc2w';
 var url = 'https://www.googleapis.com/plus/v1/people/' + profileid + '?key=' + apikey;
 $.ajax({
 type: "GET",
 dataType: "json",
 url: url,
 success: function (data) {
 var googlefollowcount = data.circledByCount;
 $(".googlefollowercount").html(googlefollowcount);
 }
 });

and get it on a div as below:

<div class="googlefollowercount"></div>

You can also get Demo on JsFiddle from below:

Demo

Hope you will like it 🙂

Himanshu is a young engineer living in India. Currently working at Cognizant as a Senior Engineer. He is an ethical hacker & blogger too, doing lots of crazy stuff... If you seem interesting, go through his portfolio: www.himstar.info : "Open Source. Millions of open minds can't be wrong!

2 comments: On Get Google Plus Followers Count Using API

Leave a reply:

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Site Footer

Sliding Sidebar

We are India’s largest Startup Community


We are team of ' Delhi Startups ' , most active startup community with strict spam policy.
We are making !deas happen..for future, business and jobs without charging anything, with connecting entrepreneurs.. It's a reason to trust on us.
Come and join or subscribe, we will defiantly give a reason to like us.

Our Facebook Page