duancai7002 2013-05-24 12:05
浏览 31
已采纳

如何使用facebook php sdk检索facebook用户的朋友电子邮件信息

This is what I tried

if ($user) {
  try {    
  $my_access_token=$facebook->getAccessToken();

  $friends = $facebook->api('/me/friends',array('access_token'=>$my_access_token));
  echo "<pre>";
  print_r($friends);
  echo "</pre>";
  } catch (FacebookApiException $e) {
  echo '<pre>'.htmlspecialchars(print_r($e, true)).'</pre>';
  $user = null;

} }

But this code only return the list of friends & not the friends email id

even after setting the permission like User & Friend Permissions,email in the app configuration.

Any idea?

how to get friend's email addresses

Thanks in advance!

  • 写回答

1条回答 默认 最新

  • douzhaocheng4533 2013-05-24 12:21
    关注

    You cannot retrieve the email address of User's Friends. Quoting from Email Permission documentation

    Note: There is no way for apps to obtain email addresses for a user's friends.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 yolov8边框坐标
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥16 mybatis的代理对象无法通过@Autowired装填
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂