cheezburger cheezburger - 2 years ago 162
jQuery Question

Display Twitter feed with a JSON file

I have an extracted twitter feed (.json file) with some tweets in it and I just want to display it but for some reason my code doesn't work. Can anyone help me?



<script type="text/javascript" src=""></script>
url: '',
dataType: 'jsonp',
success: function(dataWeGotViaJsonp){
var text = '';
var len = dataWeGotViaJsonp.length;
for(var i=0;i<len;i++){
twitterEntry = dataWeGotViaJsonp[i];
text += '<p><img src = "' + twitterEntry.user.profile_image_url_https +'"/>' + twitterEntry['text'] + '</p>'
<div id='twitterFeed'></div>

Answer Source

You have to change this

dataType: 'jsonp',

to this

dataType: 'json',


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download