【问题标题】:REST approach for Twitter facing errorTwitter面临错误的REST方法
【发布时间】:2011-10-17 15:18:15
【问题描述】:

每当我执行 GET 操作时

http://api.twitter.com/1/friends/UID.json
http://api.twitter.com/1/followers/?ids%5B%5D=74776862

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

我收到了这个错误

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

和响应为

"<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>"

我还应该传递其他东西吗?

【问题讨论】:

    标签: ruby-on-rails rest twitter restful-authentication omniauth


    【解决方案1】:

    见推特documentation。您有多种身份验证选项。对于 RESTful 服务,OAuth 是可行的方法。

    【讨论】:

    • 我正在使用 Twitter API 进行身份验证,之后我得到了令牌和秘密哈希,现在我无法知道如何使用它们得到了 Twitter 的 GET 或 POST 请求,请帮助跨度>
    猜你喜欢
    • 1970-01-01
    • 2022-06-20
    • 2013-04-21
    • 2016-12-07
    • 2020-11-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-02-08
    相关资源
    最近更新 更多