An error 401 (Not Authorized) or an error code 0 is returned by Twitter
Answer
Sometimes you will get an 401 error as return code from Twitter when you have authorized the application or when you post to Twitter.
There are some reasons and solutions:
- Check if Twitter is down: http://status.twitter.com/
- Check your account token data again and check if the App has read and write permission on Twitter (See the Settings/Connections section on yout Twitter acount).
- Wait a view hours. Sometimes Twitter needs some time to synchronize the data etc.
- If your Twitter account is new and/or you have no tweets done, write some tweets with the web interface and wait a view hours.
- Check if CURL is correctly installed (with SSL support!).
- Check your system clock (This is NOT a joke!): The System clock must be correctly set when requesting request token and/or posting to Twitter. See this two links for information about this issue:
http://blainegarrett.com/2009/07/14/failed-to-validate-oauth-signature-and-token-on-twitter-oauth-check-your-cloc/
http://groups.google.com/group/twitter-development-talk/browse_thread/thread/aadee92bc5c34f29?pli=1 - Check if the needed URLs are blocked or restricted (including https/SSL): http://www.1st-movers.com/faq/3-autotweet/6-what-domains--external-urls-are-usedneeded-by-autotweet
- Check for Blacklisting. Check if your account or IP is blacklisted: http://apiwiki.twitter.com/FAQ#IsmyIPbannedorblacklisted
If you can't solve the problem feel free to post to the forum.




