开发者

MGTwitterEngine Iphone oAuth

开发者 https://www.devze.com 2023-02-14 08:10 出处:网络
I hve try the MGTwitterEngine for oAuth from source https://github.com/kimptoc/MGTwitterEngine-1.0.8-OAuth

I hve try the MGTwitterEngine for oAuth from source https://github.com/kimptoc/MGTwitterEngine-1.0.8-OAuth

I am using this code for the MGTwitterEngine oAuth... but not working for me...

it give the same error I was getting in using xAuth without enabling xAuth Twitter integrated in Iphone App

Error Log is:

Twitter request failed! (3AFB8476-929F-4467-A4FE-DE4335开发者_C百科8CB62A) Error: The operation couldn’t be completed. (HTTP error 401.) ((null))

and one more thing I have not found anything in the for setting the application key and secret?

may be error due to this.. please help me.

Edited Code on twitter button tab

-(IBAction)twitterBtnAct:(id)sender{
    // Put your Twitter username and password here:
    NSString *username = @"username";
    NSString *password = @"password";

    // Make sure you entered your login details before running this code... ;)
    if ([username isEqualToString:@""] || [password isEqualToString:@""]) {
        NSLog(@"You forgot to specify your username/password in AppController.m!");
    }

    // Create a TwitterEngine and set our login details.
    twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];
    [twitterEngine setUsername:username password:password];

    // Get updates from people the authenticated user follows.
    [twitterEngine getFollowedTimelineFor:username since:nil startingAtPage:0];
}

Amit Battan


HTTP 401 errors are about authentication problems. In the project, the application does:

 twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];
 [twitterEngine setUsername:username password:password]

Have you set this in your app?


I have use https://github.com/bengottlieb/Twitter-OAuth-iPhone for oAuth

0

精彩评论

暂无评论...
验证码 换一张
取 消