Helping you build a better website
(and other interesting web stuff)

Silva Web Designs - Blog

How to get Instagram / Twitter followers count using JQuery Ajax?

In this article I am going to show you how you can get the total Twitter and Instagram followers count using jQuery.

Twitter Followers Count

We can simply get the number of Twitter followers by using CDN widgets, so we are going to use the below CDN with the screen name ‘silvawebdesigns’.

In the following example you can see how it is work and how to get it. The only thing you need to change is the twitter_username variable to your Twitter handle.


<h3>Silva Web Designs has <span id="twitter-followers"></span> Twitter followers.</h3>


var twitter_username = 'SilvaWebDesigns';

  url: "" + twitter_username,
  dataType: 'jsonp',
  crossDomain: true
}).done(function(data) {

See this JSFIDDLE for a working demo.

Instagram Followers Count

For Instagram you will need to generate an Instagram token,

Once you have your token, you can update the code below code with your “token” variable:-


<h3>Silva Web Designs has <span id="instagram-followers"></span> Instagram followers.</h3>


<code class="language-JS">
var token = '1436436854.1677ed0.0e88a59d9da247c6bd035ac186a9c9c8';

  url: '',
  dataType: 'jsonp',
  type: 'GET',
  data: {
    access_token: token
  success: function(data) {
    var follows = data['data']['counts']['followed_by'];
  error: function(data) {

See this JSFIDDLE for a working demo.

It’s good to share

Join the discussion