简体   繁体   中英

Twitter Integration with OAuth with asp.net

I have been trying to establishing an integration with twitter, what i need is just below features.

  1. I should be able to extract all the tweets for my account and display it in my application.
  2. I should be able to post status when i enter a text in my textbox and click on submit.

I have tried multiple ways, even used 3rd party Libraries like TweetSharp(it worked pretty well.) As i need to deliver this to a client, i dont want to use any third party tools, as there will be no one to support in case of any issues.

First think it should be completely free. So i have tried using OAuth as explained in the below link. i have updated the twitter api version to 1.1 and added my Consumer Key, Secret, AccessToken and Secret. I executed the application. To my surprise, my message was posted on to the twitter. but when i changed the status and executed again, it stopped working and it keep gives my error. 错误。

The example im following might not be the complete one, may be i need to regenerate a access key and do something else. I m confused. can you please help me how i can proceed further and with link to any post with complete code.

http://www.codeproject.com/Articles/247336/Twitter-OAuth-authentication-using-Net

Thank you.

Every status must be unique, or you'll receive an error. For this reason, I append the date/time to the end of the tweet when testing.

BTW, if you ever change your mind about 3rd party libraries, check out LINQ to Twitter .

Just for Info: New API is more strict while sending headers and creating Signature.

Make sure you fulfill these requirements:

Header values should be in sorted order(lexicographically)

GET Request: Header should not include any querystring values. Signature base should contain all values including querystring values

POST Reqeust: Header should include post parameter values. Signature base should contain all values including parameter values Post request Url should append all prameter values in QueryString and requst should be sent to that

This should solve most authorization issues.

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