Use twitter ios sdk oAuth

2k views Asked by At

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:@"[email protected]"];
//_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

2

There are 2 answers

1
Amit Battan On

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

0
Mohith Km On
-(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