【问题标题】:Get all followers Email Ids in twitter in website在网站的 twitter 中获取所有关注者的电子邮件 ID
【发布时间】:2012-05-25 17:34:20
【问题描述】:

如何在 Twitter 中获取我的追随者电子邮件 ID?我尝试了以下代码,但它不返回电子邮件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 获取电子邮件地址。

【问题讨论】:

  • 有可能。检查here 我是如何在我的 iOS 应用中实现它的。

标签: php twitter


【解决方案1】:

Twitter API 甚至不提供经过身份验证的用户的电子邮件......所以,提供关注者的电子邮件是不可能的......对于发送消息,您应该尝试 API 发送 Direct留言

我使用亚伯拉罕 API https://github.com/abraham/twitteroauth

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

【讨论】:

    【解决方案2】:

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

    【讨论】:

      【解决方案3】:

      【讨论】:

        猜你喜欢
        • 2013-06-30
        • 1970-01-01
        • 1970-01-01
        • 2020-02-23
        • 2023-03-16
        • 1970-01-01
        • 2015-01-26
        • 2013-05-01
        • 1970-01-01
        相关资源
        最近更新 更多