oauth Login Twitter using FHSTwitterEngine. I want to fetch gender, email, username, birthday from twitter logged twitter account. Now, I got username only.
Asked
Active
Viewed 1,639 times
0
-
show your error log or what you have tried? – Mani Jan 28 '14 at 05:10
-
1No Error Log `UIViewController *loginController = [[FHSTwitterEngine sharedEngine]loginControllerWithCompletionHandler:^(BOOL success) { NSLog(@"FHSTwitterEngine.sharedEngine.authenticatedUsername %@", FHSTwitterEngine.sharedEngine.authenticatedUsername); NSLog(@"FHSTwitterEngine.sharedEngine.authenticatedID %@", FHSTwitterEngine.sharedEngine.authenticatedID); }]; [self presentViewController:loginController animated:YES completion:nil];` – user3164056 Jan 28 '14 at 05:17
-
Does FHSTwitterEngine claim to be able to retrieve gender, email, and birthday? As far as I can tell, Twitter does not have an API to retrieve any of those. Take a look through the API docs to see if you can find something: https://dev.twitter.com/docs/api/1.1 – Sean Kladek Jan 28 '14 at 06:46
1 Answers
1
Twitter API not allow to get the user email id (Protected). Other than this you can able to fetch all the details using the following snippets,
//GET AUTHENTICATION ID ONLY IF LOGGED IN
[[FHSTwitterEngine sharedEngine] permanentlySetConsumerKey:twitterAPIKey
andSecret:twitterAPISecret];
[[FHSTwitterEngine sharedEngine] setDelegate:_signInVW];
[[FHSTwitterEngine sharedEngine] loadAccessToken];
//PASS YOUR TWITTER ID, TWITTER OAUTH TOKEN STR, TWITTER OAUTH TOKEN SECREAT STR
NSArray *timeLineAry = [[FHSTwitterEngine sharedEngine] getTimelineForUser: [[FHSTwitterEngine sharedEngine] authenticatedID] isID:YES count:1];
twitterID = [[FHSTwitterEngine sharedEngine] authenticatedID];
twitterOauthTokenStr = [[FHSTwitterEngine sharedEngine] accessToken].key;
twitterOauthTokenSecretStr = [[FHSTwitterEngine sharedEngine] accessToken].secret;
if (timeLineAry.count > 0) {
}
Using the timelinearray get the user screen name and post the data to the service, Finally you will get the user info.

iApple
- 252
- 1
- 12