angularjs - How to use Twitter API from client side? -


i'm trying information twitter using angularjs , passport.

i've made authentication through oauth using passport js - worked - saved user information in session.

now i'm trying run command on twitter api endpoint (both v1.1 & v1) keeps complaining authorization.

example: executing in controller

        $http.jsonp(https://api.twitter.com/1/statuses/user_timeline.json, {          }) 

gives me error:

        https://api.twitter.com/1/statuses/user_timeline.json 401 (unauthorized) 

this command has worked in twitter console (and use jsonp avoid cross domain issues).

should pass additional headers manually request - s.a auth_token etc?

or why wouldn't work? should exploit fact i've made authentication use api? i've red https://dev.twitter.com/docs/auth/authorizing-request didn't quiet understood.

thanks helping,

all twitter requests need authorized:

https://dev.twitter.com/docs/auth/authorizing-request

so need pass oauth data in request header per document above


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -