Twitter API + OAuth: Can't send status updates, getting 401

后端 未结 5 991
甜味超标
甜味超标 2021-02-04 10:37

I\'m trying to use Twitter\'s API and OAuth to send status updates (new Tweets). I am using Shannon Whitley .NET code example http://www.voiceoftech.com/swhitley/?p=681 (as reco

相关标签:
5条回答
  • 2021-02-04 11:05

    If you authorized your application to access your Twitter account when the application was set in "read only access" mode and you get the "Read-only application cannot POST" error after changing the application settings to be "read and write access" then you have to revoke access to the application on https://twitter.com/settings/connections and then reauthorize it. The "read only" access_token tends to be sticky until you revoke it.

    0 讨论(0)
  • 2021-02-04 11:06

    Dunno what the problem was, but I deleted my Application registration on Twitter (You have to register apps in Twitter to get OAuth keys etc.), and then recreated it. Now it works fine. Weird, probably a problem with Twitter screwing up.

    I'm also using Tweetsharp (http://tweetsharp.com/), highly recommend it, it's got a nice fluent API. Note: switching over to Tweetsharp wasn't the fix, I had already switched over and had the same problem until I delete and recreated app registration on Twitter.

    0 讨论(0)
  • 2021-02-04 11:06
    • Go to http://www.twitter.com/oauth_clients
    • Select your App.
    • Edit Application Setting.
    • Set Default Access type to Read & Write.
    • Save & Run.

    Hope this helps.

    0 讨论(0)
  • 2021-02-04 11:20

    I've dont that several times now, without succes, I'm getting a 401 exception while requesting an acces token from twitter.

    I'm using Tweetsharp as well as you.

    0 讨论(0)
  • 2021-02-04 11:27

    plus also see if your system's CLOCK is synched with internet; on windows you can do it by adjusting date time settings

    because if you CLOCK is not synched you will get 401 unauthorized exception; best of luck cheers

    0 讨论(0)
提交回复
热议问题