[twitter-dev] Re: Twitter Error While Authenticating ..IPhone Application
Huh... Why it is such a mystery on xAuth. It should be very clear how oAuth & xAuth work. You need to explain well about your app before you can apply and get your xAuth approve. On Mar 2, 8:44 pm, Battan Amit wrote: > for xAuth I think we have to give the itune URL and other detail of > application > As my application is in developing stage ... So How I will get it. > > OR > > And for now how I am using oAuth in MGTwitterEngine > > > AB > > On 2 March 2011 17:19, Rich wrote: > > > Have you applied for xAuth access, oAuth is enabled for clients by > > default but xAuth you have to apply for. > > > On Mar 1, 12:53 pm, Battan Ror wrote: > > > Hi > > > > I am using MGTwitterEngine in Iphone application > > > > But I am getting error in log of function > > > - (void)requestFailed:(NSString *)connectionIdentifier withError: > > > (NSError *)error > > > { > > > NSLog(@"Twitter Request failed for connectionIdentifier = %@, > > > error = %@ (%@)", > > > connectionIdentifier, > > > [error localizedDescription], > > > [error userInfo]); > > > > } > > > > Error Log > > > > Twitter Request failed for connectionIdentifier = > > > 8E192CD3-35E5-46C8-86E9-1EADEE38B6E8, error = The operation couldn’t > > > be completed. (HTTP error 401.) ({ > > > body = "\n\n > > > /oauth/access_token\n Client application is > > > not permitted to use xAuth.\n\n"; > > > response = ""; > > > > }) > > > > following code in controller class > > > -(IBAction)twitterBtnAct:(id)sender{ > > > // Put your Twitter username and password here: > > > NSString *username = @"myusername"; > > > NSString *password = @"mypassword"; > > > > NSString *consumerKey = @"b2jD5AXJewSNfmCBfzvlw"; > > > NSString *consumerSecret = > > > @"ceqEECJalqtVUnxl8sNQxrh5dXGUvo9cg4HxKNn6g"; > > > > // Most API calls require a name and password to be set... > > > if (! username || ! password || !consumerKey || !consumerSecret) { > > > NSLog(@"You forgot to specify your username/password/key/ > > > secret in AppController.m, things might not work!"); > > > NSLog(@"And if things are mysteriously working without > > the username/ > > > password, it's because NSURLConnection is using a session cookie from > > > another connection."); > > > } > > > > // Create a TwitterEngine and set our login details. > > > twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self]; > > > [twitterEngine setUsesSecureConnection:NO]; > > > [twitterEngine setConsumerKey:consumerKey secret:consumerSecret]; > > > // This has been undepreciated for the purposes of dealing with > > > Lists. > > > // At present the list API calls require you to specify a user > > > that owns the list. > > > [twitterEngine setUsername:username]; > > > > [twitterEngine getXAuthAccessTokenForUsername:username > > > password:password]; > > > > } > > > > #pragma mark Twitter methods > > > #pragma mark MGTwitterEngineDelegate methods > > > - (void)accessTokenReceived:(OAToken *)aToken forRequest:(NSString > > > *)connectionIdentifier > > > { > > > NSLog(@"Twitter Access token received! %@",aToken); > > > token = [aToken retain]; > > > [self runTests]; > > > > } > > > > - (void)requestSucceeded:(NSString *)connectionIdentifier > > > { > > > NSLog(@"Twitter Request succeeded for connectionIdentifier = %@", > > > connectionIdentifier); > > > > } > > > > - (void)statusesReceived:(NSArray *)statuses forRequest:(NSString > > > *)connectionIdentifier > > > { > > > NSLog(@"Twitter Got statuses for %@:\r%@", connectionIdentifier, > > > statuses); > > > > } > > > > - (void)directMessagesReceived:(NSArray *)messages forRequest: > > > (NSString *)connectionIdentifier > > > { > > > NSLog(@"Twitter Got direct messages for %@:\r%@", > > > connectionIdentifier, messages); > > > > } > > > > - (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString > > > *)connectionIdentifier > > > { > > > NSLog(@"Twitter Got user info for %@:\r%@", connectionIdentifier, > > > userInfo); > > > > } > > > -- > > Twitter developer documentation and resources:http://dev.twitter.com/doc > > API updates via Twitter:http://twitter.com/twitterapi > > Issues/Enhancements Tracker: > >http://code.google.com/p/twitter-api/issues/list > > Change your membership to this group: > >http://groups.google.com/group/twitter-development-talk -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
Re: [twitter-dev] Re: Twitter Error While Authenticating ..IPhone Application
for xAuth I think we have to give the itune URL and other detail of application As my application is in developing stage ... So How I will get it. OR And for now how I am using oAuth in MGTwitterEngine AB On 2 March 2011 17:19, Rich wrote: > Have you applied for xAuth access, oAuth is enabled for clients by > default but xAuth you have to apply for. > > On Mar 1, 12:53 pm, Battan Ror wrote: > > Hi > > > > I am using MGTwitterEngine in Iphone application > > > > But I am getting error in log of function > > - (void)requestFailed:(NSString *)connectionIdentifier withError: > > (NSError *)error > > { > > NSLog(@"Twitter Request failed for connectionIdentifier = %@, > > error = %@ (%@)", > > connectionIdentifier, > > [error localizedDescription], > > [error userInfo]); > > > > } > > > > Error Log > > > > Twitter Request failed for connectionIdentifier = > > 8E192CD3-35E5-46C8-86E9-1EADEE38B6E8, error = The operation couldn’t > > be completed. (HTTP error 401.) ({ > > body = "\n\n > > /oauth/access_token\n Client application is > > not permitted to use xAuth.\n\n"; > > response = ""; > > > > }) > > > > following code in controller class > > -(IBAction)twitterBtnAct:(id)sender{ > > // Put your Twitter username and password here: > > NSString *username = @"myusername"; > > NSString *password = @"mypassword"; > > > > NSString *consumerKey = @"b2jD5AXJewSNfmCBfzvlw"; > > NSString *consumerSecret = > > @"ceqEECJalqtVUnxl8sNQxrh5dXGUvo9cg4HxKNn6g"; > > > > // Most API calls require a name and password to be set... > > if (! username || ! password || !consumerKey || !consumerSecret) { > > NSLog(@"You forgot to specify your username/password/key/ > > secret in AppController.m, things might not work!"); > > NSLog(@"And if things are mysteriously working without > the username/ > > password, it's because NSURLConnection is using a session cookie from > > another connection."); > > } > > > > // Create a TwitterEngine and set our login details. > > twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self]; > > [twitterEngine setUsesSecureConnection:NO]; > > [twitterEngine setConsumerKey:consumerKey secret:consumerSecret]; > > // This has been undepreciated for the purposes of dealing with > > Lists. > > // At present the list API calls require you to specify a user > > that owns the list. > > [twitterEngine setUsername:username]; > > > > [twitterEngine getXAuthAccessTokenForUsername:username > > password:password]; > > > > } > > > > #pragma mark Twitter methods > > #pragma mark MGTwitterEngineDelegate methods > > - (void)accessTokenReceived:(OAToken *)aToken forRequest:(NSString > > *)connectionIdentifier > > { > > NSLog(@"Twitter Access token received! %@",aToken); > > token = [aToken retain]; > > [self runTests]; > > > > } > > > > - (void)requestSucceeded:(NSString *)connectionIdentifier > > { > > NSLog(@"Twitter Request succeeded for connectionIdentifier = %@", > > connectionIdentifier); > > > > } > > > > - (void)statusesReceived:(NSArray *)statuses forRequest:(NSString > > *)connectionIdentifier > > { > > NSLog(@"Twitter Got statuses for %@:\r%@", connectionIdentifier, > > statuses); > > > > } > > > > - (void)directMessagesReceived:(NSArray *)messages forRequest: > > (NSString *)connectionIdentifier > > { > > NSLog(@"Twitter Got direct messages for %@:\r%@", > > connectionIdentifier, messages); > > > > } > > > > - (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString > > *)connectionIdentifier > > { > > NSLog(@"Twitter Got user info for %@:\r%@", connectionIdentifier, > > userInfo); > > > > } > > > > > > -- > Twitter developer documentation and resources: http://dev.twitter.com/doc > API updates via Twitter: http://twitter.com/twitterapi > Issues/Enhancements Tracker: > http://code.google.com/p/twitter-api/issues/list > Change your membership to this group: > http://groups.google.com/group/twitter-development-talk > -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk
[twitter-dev] Re: Twitter Error While Authenticating ..IPhone Application
Have you applied for xAuth access, oAuth is enabled for clients by default but xAuth you have to apply for. On Mar 1, 12:53 pm, Battan Ror wrote: > Hi > > I am using MGTwitterEngine in Iphone application > > But I am getting error in log of function > - (void)requestFailed:(NSString *)connectionIdentifier withError: > (NSError *)error > { > NSLog(@"Twitter Request failed for connectionIdentifier = %@, > error = %@ (%@)", > connectionIdentifier, > [error localizedDescription], > [error userInfo]); > > } > > Error Log > > Twitter Request failed for connectionIdentifier = > 8E192CD3-35E5-46C8-86E9-1EADEE38B6E8, error = The operation couldn’t > be completed. (HTTP error 401.) ({ > body = "\n\n > /oauth/access_token\n Client application is > not permitted to use xAuth.\n\n"; > response = ""; > > }) > > following code in controller class > -(IBAction)twitterBtnAct:(id)sender{ > // Put your Twitter username and password here: > NSString *username = @"myusername"; > NSString *password = @"mypassword"; > > NSString *consumerKey = @"b2jD5AXJewSNfmCBfzvlw"; > NSString *consumerSecret = > @"ceqEECJalqtVUnxl8sNQxrh5dXGUvo9cg4HxKNn6g"; > > // Most API calls require a name and password to be set... > if (! username || ! password || !consumerKey || !consumerSecret) { > NSLog(@"You forgot to specify your username/password/key/ > secret in AppController.m, things might not work!"); > NSLog(@"And if things are mysteriously working without the > username/ > password, it's because NSURLConnection is using a session cookie from > another connection."); > } > > // Create a TwitterEngine and set our login details. > twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self]; > [twitterEngine setUsesSecureConnection:NO]; > [twitterEngine setConsumerKey:consumerKey secret:consumerSecret]; > // This has been undepreciated for the purposes of dealing with > Lists. > // At present the list API calls require you to specify a user > that owns the list. > [twitterEngine setUsername:username]; > > [twitterEngine getXAuthAccessTokenForUsername:username > password:password]; > > } > > #pragma mark Twitter methods > #pragma mark MGTwitterEngineDelegate methods > - (void)accessTokenReceived:(OAToken *)aToken forRequest:(NSString > *)connectionIdentifier > { > NSLog(@"Twitter Access token received! %@",aToken); > token = [aToken retain]; > [self runTests]; > > } > > - (void)requestSucceeded:(NSString *)connectionIdentifier > { > NSLog(@"Twitter Request succeeded for connectionIdentifier = %@", > connectionIdentifier); > > } > > - (void)statusesReceived:(NSArray *)statuses forRequest:(NSString > *)connectionIdentifier > { > NSLog(@"Twitter Got statuses for %@:\r%@", connectionIdentifier, > statuses); > > } > > - (void)directMessagesReceived:(NSArray *)messages forRequest: > (NSString *)connectionIdentifier > { > NSLog(@"Twitter Got direct messages for %@:\r%@", > connectionIdentifier, messages); > > } > > - (void)userInfoReceived:(NSArray *)userInfo forRequest:(NSString > *)connectionIdentifier > { > NSLog(@"Twitter Got user info for %@:\r%@", connectionIdentifier, > userInfo); > > } > > -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk