开发者

REST approach for Twitter facing error

开发者 https://www.devze.com 2023-03-24 03:33 出处:网络
whenever I do a GET http://a开发者_如何学Cpi.twitter.com/1/friends/UID.json http://api.twitter.com/1/followers/?ids%5B%5D=74776862

whenever I do a GET

http://a开发者_如何学Cpi.twitter.com/1/friends/UID.json
http://api.twitter.com/1/followers/?ids%5B%5D=74776862

or

https://api.twitter.com/1/statuses/user_timeline.json

I am getting this error

{"error":"This method requires authentication.","request":"\/1\/statuses\/user_timeline.json"}

and Response as

"<html><body>You are being <a href=\"http://api.twitter.com/login?redirect_after_login=%2F1%2Ffollowers%2F%3Fids%255B%255D%3D74776862\">redirected</a>.</body></html>"

should I pass somehing else also ?


See the twitter documentation. You have several options for Authentication. For a RESTful service OAuth is the way to go.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号