I am developing a Twitter client for Mac OSX and I am using MgTwitter framework. I use xAuth login method and it works fine but I can't get tweets from my timeline.
Here is the error message in the console:
+[OARequestParameter requestParameter:value:]: unrecognized selector sent to class
And here is the code for login method and the functions to manage the token element:
- (void)startTwitter {
NSLog(@"Starting twitter connection...");
NSString *consumerKey = @"***************";
NSString *consumerSecret = @"*********";
twitterEngine = [[MGTwitterEngine alloc] initWithDelegate:self];
[twitterEngine setUsesSecureConnection:NO];
[twitterEngine setConsumerKey:consumerKey secret:consumerSecret];
[twitterEngine setUsername:user];
// xAuth method
[twitterEngine getXAuthAccessTokenForUsername:user password:password];
// update timeline
[self updateTwitterBuffer];
} // startTwitter
- (void) updateTwitterBuffer {
NSLog(@"Updating timeline.");
[twitterEngine getHomeTimelineSinceID:0 startingAtPage:0 count:20];
[twitterEngine getDirectMessagesSinceID:0 startingAtPage:0];
[twitterEngine getSentDirectMessagesSinceID:0 startingAtPage:0];
} // updateTwitterBuffer
- (void) stopTwitter {
[twitterEngine release];
[token release];
} // stopTwitter
- (void)accessTokenReceived:(OAToken *)aToken forRequest:(NSString *)connectionIdentifier {
NSLog(@"Access token received! %@",aToken);
token = [aToken retain];
[twitterEngine setAccessToken:token];
} // accessTokenReceived
I don't know where the error is. How can I solve it? Thanks a lot.
thanks for the link. I knew this tutorial but it uses oAuth login method and I want to use xAuth. MgtwitterEngine supports xAuth but I don't understand the error message. – Tyflos Jun 01 '11 at 18:25
I knew that tutorial but it uses oAuth login process and I want to use xAuth one. I don't understand the error message. I followed the demo app in MgTwitterEngine but I can connect to twitter but I can't get my timeline.
Excuse me about the problems to read the source code. I'm blind and I can read it well. I rewrote it with HTML tags. I hope you can read it better now. Thanks a lot.
– Tyflos Jun 01 '11 at 18:33