Authentication for Twitter API only (using TweetSharp)

I am trying to extract public tweets from a server-side application using authentication only for applications (without user context).

The following code works fine:

var service = new TwitterService("<consumer key>", "<consumer secret>"); service.AuthenticateWith("<access token>", "<access token secret>"); var options = new ListTweetsOnUserTimelineOptions { ScreenName = "billgates" }; foreach (var tweet in service.ListTweetsOnUserTimeline(options)) Console.WriteLine(tweet.Text); 

However, I am going from this diagram that it is not necessary to specify an access token / secret:

Application-only authentication

However, when I delete the AuthenticateWith call, ListTweetsOnUserTimeline returns null.

This is a library limitation, if not, how can I do this?

EDIT

As far as I can tell, this calls the GET statuses/user_timeline , which should only support authentication for applications, according to the documentation :

API methods that support this form of authentication will contain two speed limits in their documentation, that is, for each user (for authentication of the user application), and the other for each application (for this form of authentication only for the application)

The GET statuses/user_timeline method GET statuses/user_timeline has these 2 limitations specified in its documentation.

+8
c # twitter tweetsharp
source share
2 answers

This is confirmed as unsupported: https://github.com/danielcrenna/tweetsharp/issues/80#issuecomment-19862455

As this project retires, there is no plan to support it.

+1
source share

I think this is not a library limitation, but a Twitter API limitation.

As far as I know, the ListTweetsOnUserTimeline () method uses the status / user_timeline API call.

GET status / user_timeline

As you can see, this call requires authentication.

You can try using the Streaming API to get statuses. I can’t help you, because I only have experience with user threads, not public.

Public streams

Also, TweetSharp has some streaming issues, I had to switch to the Linq2Twitter library.

+1
source share

All Articles