How to use jsonp Twitter Api 1.1 callback?

Looking at the Twitter doc: https://dev.twitter.com/docs/api/1.1/get/search/tweets
I can use a callback (optional) and it says, "If provided, the response will use JSONP format with callback of the given name The usefulness of this parameter is somewhat diminished by the requirement for authentication for requests to this endpoint.

Example values: processTweets "
However jsonp uses a script tag, so there is no way to pass the auth header in the headers, and Twitter uses oAuth. According to https://github.com/ddo/oauth-1.0a I can pass data: oauth.authorize (request_data , token) as authentication data, but since I am doing "GET" I cannot pass data as data, only as params. So I don't think this jsonp can work at all. Correct me if I'm wrong, but is there a way to work with jsonp using Twitter api 1.1? Thanks.

+3


source to share





All Articles