How to generate OAuth signature with c# for Twitter API 1.1?

不羁的心 提交于 2020-02-22 06:26:25

问题


I'm working on an app and a part of it is to get the mentions count of this app. I created an app on Twitter and I generated an OAuth signature for the REST API v1.1 GET statuses/mentions_timeline and access the mentions timeline to get the count (https://api.twitter.com/1.1/statuses/mentions_timeline.json). My question is how did we dynamically generate the oauth signature to access the mentions timeline and get the counts.


回答1:


You can either write your own OAuth provider or use an existing library. Here's a list of 3rd party libraries on the Twitter site:

https://dev.twitter.com/docs/twitter-libraries#dotnet

DotNetOpenAuth is good and there are others.

If you want to write your own, check out Twitter's OAuth documentation:

https://dev.twitter.com/docs/auth/oauth

and here's another good OAuth reference:

http://hueniverse.com/oauth/




回答2:


The OAuth implementation does not change with the new (controversial) Twitter API. You can keep on generating OAuth signatures just like you did with Twitter API 1.0.



来源:https://stackoverflow.com/questions/12479575/how-to-generate-oauth-signature-with-c-sharp-for-twitter-api-1-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!