2012-05-18 68 views
0

如何在Twitter中获得我的关注者EmailID?我尝试了下面的代码,但它不返回emailids,它只返回Name和Screen。获取所有关注者在twitter中的电子邮件ID

<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 
} 

?> 

请帮我从Twitter获取电子邮件地址。

+0

这是可能的。检查[这里](http://stackoverflow.com/questions/30235010/get-user-profile-details-especially-email-address-from-twitter-in-ios)我是如何在iOS应用中实现它的。 – NSPratik

回答

3

Twitter的API不返回用户的电子邮件地址

相关问题