简体   繁体   English

如何使用Graph API和PHP获得我的好友事件?

[英]How can I get my friends events with the Graph API and PHP?

I'm looking to get my friends events with the Graph API and PHP. 我希望通过Graph API和PHP获得我的朋友事件。

I'm getting my events with: 我正在通过以下方式获取事件:

 $facebook->api('/me/events'); 

Is there a similar way? 有没有类似的方法?

Also, does anyone know of a reference for this? 另外,有人知道这个参考吗?

You need the friends_events permission in order to get the events of your friends also. 您还需要friends_events权限才能获取您朋友的事件。

Once your application got this permission then you can the query the same as you did for your events with the graph API... 一旦您的应用程序获得了此权限,便可以使用图形API进行与事件相同的查询...

If your friend's Facebook id is 2343423434 then the API call would be: 如果您朋友的Facebook ID为2343423434则API调用为:

$facebook->api('/2343423434/events'); 

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

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