How To Send Twitter Oauth Access Tokens With Ajax Request?
I want to load in a user's home timeline after authenticating through 'sign it with twitter' using OAuth. I'm using this library to handle the authentication part https://github.co
Solution 1:
You need to make this request into a JSONP request, so you can do cross-domain AJAX.
$.getJSON("http://api.twitter.com/1/statuses/home_timeline.json?callback=?", function(json) {
console.log(json);
});
The ?callback=?
converts this into a JSONP request.
The link you provided is for a PHP library. If you want to make API calls in JavaScript, you need to use a JavaScript OAuth library.
Post a Comment for "How To Send Twitter Oauth Access Tokens With Ajax Request?"