Quantcast
Viewing all articles
Browse latest Browse all 4126

New Post: Problem when logging in again

Hi,

I try to make a desktop application that reads tweets of a few users and uses the data on a server. The user should be able to log in in my case. Therefore I tried to display the Authorization-Web-Page once. Afterwards I store the login data (AccessToken and AccessTokenSecret) into a file.

If the application will be restarted I tried to do the login again without displaying the web page. I tried to use the login data (AccessToken and its Secret) again to log in.
Therefore I tried something this:

TwitterCredentials.SetCredentials(AccessToken, AccessTokenSecret, ConsumerKey, ConsumerSecret);
        IOAuthCredentials cred = TwitterCredentials.Credentials;
        credentials = cred;

        TwitterCredentials.ApplicationCredentials = cred;
        TwitterCredentials.Credentials = cred; // With or without. no change
        TwitterCredentials.CredentialsAccessor.CurrentThreadCredentials = cred; // With or without. no change
        TwitterCredentials.CredentialsAccessor.ApplicationCredentials = cred; // With or without. no change

After the relogin there is no exception but if I try to call GetUserTimelineAsync(...) I get something like this:
CreationDate: {16.12.2014 11:06:33}
StatusCode: 400
TwitterDescription: null
TwitterExceptionInfos: Count = 1
URL: "https://api.twitter.com/1.1/users/show.json?user_id=XXXXX"
I hope you could help me. Maybe its just a stupid mistake. I don't know how to solve this.
Thanks

Viewing all articles
Browse latest Browse all 4126

Trending Articles