Mgtwitterengine and oauth 401 error: Boggled

OK ... so here is my code:

twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];    
    [twitterEngine setConsumerKey:CONSUMER_KEY secret:CONSUMER_SECRET];
    accessToken = [twitterEngine getXAuthAccessTokenForUsername:profile.twitterUserId password:profile.twitterPassword];
    NSLog(@"Access token: %@", accessToken);

the console shows that the access token is returning just fine (so it seems to work) for example. Access Token: C8A24515-0F11-4B5A-8813-XXXXXXXXXXXXXXX

but instead of the accessTokenReceived method, which is called next to my delegate, it calls requestFailed with the number 401. How can I get 401 unauthorized access and get the access token from the method call ?????

+3
source share
2 answers

... , ... OAuth . , , twitter ... --, . api@twitter.com .

.:)

0

xAuth, , Twitter: , OAuth. OAuth URI - , xAuth.

OAuth xAuth, Twitter api@twitter.com , , . , , , . xAuth .

xAuth - auth OAuth.

+2

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


All Articles