简体   繁体   中英

Twitter API getting 401 error

I have JQuery Twitter api plugin I have been using often from site to site ( from here ). Ive recently installed it on a new site but now get a 401 error:

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

The line the error is referring looks like:

  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>';
                                });
                            },

I think this has something to do OAuth authentication but I am unsure of how to go about updating my script.

Has anyone run into this issue before?

Found the issue: I had not configured my Script to handle the user name correctly. As you can see in the error there is no username present. My username var had a mistake in it.

Thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM