how to get logged Twitter user's Detail using FHSTwitterEngine

1.6k views Asked by At

oauth Login Twitter using FHSTwitterEngine. I want to fetch gender, email, username, birthday from twitter logged twitter account. Now, I got username only.

1

There are 1 answers

0
iApple On

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.