Using C# to access Twitter API without browser authentication
I am creating a C# console application which I make use to search Twitter using the API. I tried using Twitterizer however the search api with tokens doesn't work which end up with rate limiting error pretty quickly. My question is, does anyone have a code to show me how can I make a Twitter API call in C# using my consumer keys and secrets together with the access token and secrets so that the console app can run by itself without me jumping to a webpage to get a pin开发者_JAVA技巧 like most of the tutorial does? Thanks.
Regards, Andy.
If you already have the access token and secret, then that's all you need to call one of the methods that requires authentication.
To call any method on the Twitter API that needs authentication you need 4 items:
- Consumer Token
- Consumer Secret
- Authentication Token
- Authentication Secret
If you check google code page for Twitterizer it says:
Are you getting a lot of HTTP 401 error codes? Do your updates say "via Twitterizer"?
That means you've been using Twitterizer Version 1 which uses BASIC authentication. BASIC Authentication has been scheduled for removal from Twitter for months. During the month of August, the hourly limit on the number of updates that is allowable from applications using BASIC authentication is to be lowered every day. On August 31, BASIC authentication will no longer function AT ALL.
So you will either have to use that PIN based authentication or use usual Search API
精彩评论