Reputation: 1
oauth Login Twitter using FHSTwitterEngine. I want to fetch gender, email, username, birthday from twitter logged twitter account. Now, I got username only.
Upvotes: 0
Views: 1645
Reputation: 252
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.
Upvotes: 1