Access Your Twitter Profile Without Password using jQuery

Twitter has crawled to each and every web application these days. Everyone is extracting benefits fron twitter. You can also get some advantage from twitter API by accessing your profile details from twitter. In this tutorial I will show you how to access your Twitter account details in the most simple way using jQuery without requring your password.
Live Demo Download Script

jQuery Code

<script type="text/javascript" src=""></script>
<script type="text/javascript">
twitterusername = $('#uname').val();
if(twitterusername != '')
$('#loading').text('Please wait...');
$('#twit_img').html('<img src="'+data.profile_image_url+'" height="50" width="50">');
$('#twit_bg').html('<img src="'+data.profile_background_image_url+'" height="100" width="100">');


div{float:right; border-bottom:1px dashed #909; margin-bottom:2px;}
li{border-bottom:1px dashed #909; margin-bottom:10px;}
.main{margin:auto; border:1px solid #CC0; float:none; width:520px; padding:10px; font-family:Verdana, Geneva, sans-serif; font-size:16px; color:#C39;}
b{float:left; text-align:left;}
<div class="main">
Enter your Twitter Username : <input type="text" name="user" id="uname">
<input type="button" value="Get my Profile" id="btn"><br />
<div id="loading" align="center"></div>
<li>Name : <div id="twit_name"></div></li>
<li>Username : <div id="twit_uname"></div></li>
<li>Location : <div id="twit_loc"></div></li>
<li>Total Friends : <div id="twit_frnd"></div></li>
<li>URL : <div id="twit_url"></div></li>
<li>Account Created at : <div id="twit_created"></div></li>
<li>Followers : <div id="twit_flwr"></div></li>
<li>Profile Image : <div id="twit_img" style="border:1px solid #999999; height:50; width:50;"></div></li>

Written by Arvind Bhardwaj

Arvind is a certified Magento 2 expert with more than 10 years of industry-wide experience.


3 thoughts on “Access Your Twitter Profile Without Password using jQuery

  1. hi again, i have a question, i have database of users & i want to save their data(followers) in every 5minutes, can i do that??

  2. Hi Priya,
    You can use setInterval() method of JavaScript for this purpose. In this method just call the function for saving the data.
    More programatically you can use cron jobs for your purpose.

Comments are closed.