Skip to content Skip to sidebar Skip to footer
Reading Time: 2 minutes

Get twitter followers list with each followers count using JQuery-JSON.This is easy and can be get given user’s twitter followers list with each followers count without using any PHP code.See this following diagram.You can understand this better from it.
Get twitter followers list with each followers count using JQuery-JSON

If you reload/refresh/run this file more than 4-5 times, you can view the results.Because twitter is not make more than 150 requests per hour to an account.
OK.Now we’ll see how to get twitter followers list with each followers count using JSON.
1-First of all you must load the JQuery library file.
2-Add this function.That will get followers list of the given user name or user ID.

	function getUsers(){
		var limit=25;  // limit the number of result to disaply
	    	$.ajax({
	        	url: 'https://api.twitter.com/1/followers/ids.json',
		   	data: {screen_name: 'your-twitter-screen-name/id-here', cursor:-1},
	        	dataType: 'jsonp',
	        	success: function(data) {
					if (data.length > 0 ){
						try {
							for(i=0; i 0 ){
										try {
											//alert(userData[0].screen_name);
											$('#followersList').append('
'); } catch (e) { alert(e); } } } // End success 2 *********************** }); // End Ajax 2 } // End for loop ****************************************** } ///end try { catch (e) { alert(e); } } //if (userData.length > 0 ){ } // End success 1----------------------------------------------------- }); // End Ajax 1 } // End of the getUsers function

3-Then add the html element to display users list.

 

4-Now call to this function in the document onload function.

  $(document).ready(function() {
     getUsers();
  });

If you want to display all users list, comment or remove the for loop.

Put these all together





    Get twitter followers list with each followers count using JQuery-JSON
	 
     
	


	

View Demo

Download Twitter followers list Example (35 KB)