Use twitter ios sdk oAuth

微笑、不失礼 提交于 2019-12-11 07:08:48

问题


I try to use MGTwitterEngine for twitter Iphone integration, this is supporting both xAuth and oAuth as per its documentation and firstly I try it using xAuth as which function I am calling named getXAuthAccessTokenForUsername

But my application is in developing stage .. and twitter not approving it .. they will approve it after release...

I am not able to use oAuth using MGTwitterEngine

Can anybody help me...

Even I am not able to use oAuth version from source http://mobile.tutsplus.com/tutorials/iphone/twitter-api-iphone/comment-page-1/

I can update my status successfully using it...But not able do any thing else

I try

[_engine getUserInformationForEmail:@"battan20@gmail.com"];
//_engine is the twitterengine object

then getting error

Request 9EF8DE73-6E04-46F1-9D90-484F90FCA44F failed with error: Error Domain=HTTP Code=404 "The operation couldn’t be completed. (HTTP error 404.)"

Request 016DB024-1BFB-4E9B-8734-3FFCCB93D6E4 failed with error: Error Domain=HTTP Code=403 "The operation couldn’t be completed. (HTTP error 403.)"

Please help me

Amit Battan


回答1:


When today I call

NSString *abc = [twitterObj getUserInformationFor:@"amit_battan"];
NSLog(@"abc...%@",abc);

Then I got the log

abc...F4BBA3C6-5783-46FF-A383-1B9C2319AB43
Request F4BBA3C6-5783-46FF-A383-1B9C2319AB43 succeeded

means it works ok...

But How I get the output.. in which function/variable




回答2:


-(void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString *)connectionIdentifier {
    NSMutableArray *mFollowerArray  =   nil;
    mFollowerArray  =   [userInfo retain];
    NSLog(@"count = %d",[mFollowerArray count]);
    for (int i=0; i<[mFollowerArray count]; i++) {
        NSLog(@" %@",[mFollowerArray objectAtIndex:i]);
    }
}

above code might help



来源:https://stackoverflow.com/questions/5180903/use-twitter-ios-sdk-oauth

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!