问题
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