0

How can I get my Followers EmailID in Twitter? I have try the following code, but it does not return emailids, it returns only Name and Screen.

<script src="http://code.jquery.com/jquery-latest.js"></script>
<?php
$trends_url = "http://api.twitter.com/1/statuses/followers/gunarsekar.json";
////// exmaple $trends_url = "http://api.twitter.com/1/statuses/followers/w3cgallery.json"; or $trends_url = "http://api.twitter.com/1/statuses/followers/22250021.json";

$ch = curl_init(); 

curl_setopt($ch, CURLOPT_URL, $trends_url);

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

$curlout = curl_exec($ch);

curl_close($ch);

$response = json_decode($curlout, true);
// print_r($response);
foreach($response as $friends){
 print_r($friends);
 echo "<br><br>";
$thumb = $friends['profile_image_url'];

$url = $friends['screen_name'];

$name = $friends['name'];

?>



<a title="<?php echo $name;?>" href="http://www.twitter.com/<?php echo $url;?>"><img class="photo-img" src="<?php echo $thumb?>" border="0" alt="" width="40" /></a>
<?php
} 

?>

Please help me to get the Email Address from Twitter.

jamesmortensen
  • 33,636
  • 11
  • 99
  • 120
Manikandan Thangaraj
  • 1,594
  • 8
  • 24
  • 44
  • It's possible. Check [here](http://stackoverflow.com/questions/30235010/get-user-profile-details-especially-email-address-from-twitter-in-ios) how I achieved it in my iOS App. – NSPratik Jun 04 '15 at 07:21

3 Answers3

4

The Twitter API does not even provide the authenticated User's Email.........So,providing Follower's Email is out of question.......For sending Message,you should try API to send Direct Message

I use Abraham API https://github.com/abraham/twitteroauth

How to send a Direct message using Abraham's oauth library

Community
  • 1
  • 1
3

The Twitter API does not return a user's email address

Philip
  • 4,592
  • 2
  • 20
  • 28
1

Look over this https://dev.twitter.com/docs/faq#6718.

Rohit Choudhary
  • 2,253
  • 1
  • 23
  • 34