I have read many Twitter & jQuery questions on here but none seem to answer my question. I am simply trying to grab 5 "tweets" from a public user. I am not doing anything with the data at this step, but my callback function never fires.
$.getJSON("https://api.twitter.com/1.1/statuses/user_timeline.json?callback=?",
{
screen_name: 'dojo',
count: '5'
},
function (data) {
alert("IT WORKED!");
});
Here is the same code on jsFiddle
Thank you for your help
That isn't going to work because Twitter has now required that you authenticate in order to fetch tweets for a given user.
Reference: https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline Look at 'Authentication' info.
You'll want to use a library to help get an oauth signature and make the request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With