Get Google Plus Followers Count Using API

One of my friend asked me to help him with the similar problem. He wanted to get the Google Plus followers count through API and display it manually on his website. He wanted a simple way to pull in live follower data and display it dynamically without any complicated backend or manual updates.

Most developers would like to embed social media statistics into their websites to boost credibility and user engagement. This is to get the number of followers and display on a webpage with the help of JavaScript or jQuery automatically. This helps in keeping the data updated always without any human intervention.

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 🙂

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