Manual REST API Authentication

Basically I want to use Twitter user search method (REST API), this is: http://apiwiki.twitter.com/w/page/24142947/Twitter-REST-API-Method:-users-lookup

but only for one request, therefore more or less manually.

When the API supported basic authentication, I could just plug in my username / password and collect information about how people are tweeting for a given subject / search (regarding how many followers they have, location, etc. - mainly for the purpose of achieving / profit). I would just query the XML, format it, and run it in an excel file for playback.

Since Twitter no longer supports basic authentication with this method, is there any other way that I can manually request this information, or do I really need to configure oAuth?

Is there any other option that is easier?

+3
source share
2 answers

LINQPad Twitter; , . ( , , , ). Windows, , Windows, , Dump(), LINQPad, - timeaver.

LINQPad

Twitter. dev.twitter.com .

, OAuth, LINQPad .NET Framework 4.0 ( . )

Twitterizer, .NET Twitter. 2.3.1. ZIP , . .

LINQPad, Query 1 #..

F4, . ... Twitterizer2.dll, .

Adding a reference to Twitterizer2.dll in LINQPad

Twitterizer :

Adding a reference to Twitterizer in LINQPad

"", .

Query 1 :

OAuthTokens tokens = new OAuthTokens();
tokens.ConsumerKey = "YourConsumerKey";
tokens.ConsumerSecret = "YourConsumerSecret";
tokens.AccessToken = "YourAccessToken";
tokens.AccessTokenSecret = "YourAccessSecret";

TwitterUser.Lookup(
  tokens, 
  new LookupUsersOptions { 
    ScreenNames={"arcain","dotnetdevbuzz"}, IncludeEntities=true 
  }
).Dump(); // the magic happens here!

F5, , LINQPad Twitter, .

Dump() , :

Results from calling Twitter using LINQPad and Twitterizer

" " Excel, Word HTML, .

, Dump() , . , , , .


, Twitter dev, Twurl. Twurl - , Apps dev.twitter.com. , :

Link to the Twurl Console

Twurl , , -. , ( LINQPad -) , apigee.com, OAuth.

+1

- URL- , /users/show:

http://api.twitter.com/1/users/show.xml?screen_name=barackobama

. /users/lookup , , OAuth.

+1

Source: https://habr.com/ru/post/1789020/


All Articles