【问题标题】:Twitter API getting 401 errorTwitter API 出现 401 错误
【发布时间】:2012-07-19 04:57:21
【问题描述】:

我有 JQuery Twitter api 插件,我经常在各个站点之间使用 (from here)。我最近在一个新站点上安装了它,但现在收到 401 错误:

Failed to load resource: the server responded with a status of 401 (Unauthorized)
jsonp1342737708184({"error":"This method requires authentication.","request":"\/1\/statuses\/user_timeline.json\/?callback=jsonp1342737708184&include_rts=true&count=3&include_entities=true"}) 

错误所指的行如下所示:

  at: function(tweet) {
            return tweet.replace(/\B[@@]([a-zA-Z0-9_]{1,20})/g, function(m, username) {
                    return '<a target="_blank" class="twtr-atreply" href="http://twitter.com/intent/user?screen_name=' + username + '">@' + username + '</a>';
                                });
                            },

我认为这与 OAuth 身份验证有关,但我不确定如何更新我的脚本。

以前有人遇到过这个问题吗?

【问题讨论】:

标签: jquery api twitter twitter-oauth


【解决方案1】:

发现问题:我没有配置我的脚本来正确处理用户名。正如您在错误中看到的那样,不存在用户名。我的用户名 var 有错误。

谢谢!

【讨论】:

    猜你喜欢
    • 2013-06-21
    • 2011-04-02
    • 1970-01-01
    • 1970-01-01
    • 2012-05-12
    • 2017-02-07
    • 1970-01-01
    • 1970-01-01
    • 2020-07-09
    相关资源
    最近更新 更多