简体   繁体   English

使用Graph API获取我朋友的电子邮件

[英]Get the email of my friends using Graph API

Is there any possible way from which i can access my friends email using php-sdk? 有什么办法可以使用php-sdk访问我的朋友的电子邮件? Assuming that I am logged in is it possible to see the same info through a php script .What i want to do is send a gmail invite to all my friends on facebook using graph.facebook.com/$id/ it asks for a access token please help me with it . 假设我已登录,则可以通过php脚本查看相同的信息。我要执行的操作是使用graph.facebook.com/$id/向Gmail上的所有朋友发送gmail邀请,它要求访问令牌,请帮助我。

  1. While login, set the permissions for email also, and you would be able to access the email 登录时,还设置电子邮件的权限,您将能够访问该电子邮件

     $facebook->api('/FRIEND_ID?fields=email') 
  2. for access token , use - 对于访问令牌,请使用-

     $facebook->getAccessToken() 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM