I am developing an iOS app where i use Social.framework and Accounts.farmework to get Twitter account information.I am getting all the necessary info but not the Email address of the account. After googling i am confuse is it really available? Need help.
2 Answers
Yes, you can get user the information. Check out this!

- 1
- 1

- 4,142
- 8
- 37
- 50
-
yes i did.but there is no email address of the account.i need the email address. – Sofeda Jun 24 '15 at 05:56
To request a user’s email, call the TwitterAuthClient#requestEmail method, passing in a valid TwitterSession and Callback.
TwitterAuthClient authClient = new TwitterAuthClient();
authClient.requestEmail(session, new Callback() {
@Override
public void success(Result result) {
// Do something with the result, which provides
// the email address
}
@Override
public void failure(TwitterException exception) {
// Do something on failure
}
});
Click 'Allow' when asked to 'Share your Email Address'.
If the user grants access and the email address is available, the success method is called with the email address in the result.
If the user denies access, the failure method will be called instead.
Note that even if the user grants access to her email address, it is not guaranteed you will get an email address. For example, if someone signed up for Twitter with a phone number instead of an email address, the email field may be empty. When this happens, the failure method will be called because there is no email address available.

- 1,651
- 2
- 15
- 20
-
-
Oh.i get it.But it is not in iOS frameworks.So for this i need to use Twitter SDK for iOS or Twitter API? – Sofeda Jun 24 '15 at 06:24