简体   繁体   English

Twitterizer - 远程服务器返回错误:(401)未经授权

[英]Twitterizer - The remote server returned an error: (401) Unauthorized

Most answers to this questions suggest to make sure your Twitter app is setup as a "web app" and not a "desktop app"... in the current Twitter dev site... I do not see this option. 这个问题的大多数答案建议确保您的Twitter应用程序设置为“Web应用程序”而不是“桌面应用程序”...在当前的Twitter开发站点...我没有看到这个选项。

I also made sure to provide a callback URL when first setting up my app. 我还确保在首次设置我的应用时提供回调网址。

Any thoughts? 有什么想法吗?

Use the callback url for your app. 使用您应用的回调网址。 For local development, you can use 127.0.0.1 or proxied address like http://www.localhost.com . 对于本地开发,您可以使用127.0.0.1或代理地址,如http://www.localhost.com Then, error will disappear. 然后,错误将消失。 Thanks. 谢谢。

The API returns a 401 when the OAuth tokens you've provided are revoked/invalid or any time you attempt an action for which you do not have access. 当您提供的OAuth令牌被撤销/无效或您尝试无法访问的操作时,API会返回401。 For example, if your application is read-only and it attempts to post a tweet, a 401 will be returned. 例如,如果您的应用程序是只读的并且它尝试发布推文,则将返回401。

Twitter does provide an error message and Twitterizer will return that to you when it can. Twitter确实提供了一条错误消息,Twitterizer会在可能的情况下将其返回给您。 It is in the ErrorMessage property of the response. 它位于响应的ErrorMessage属性中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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