检索事件,其中 uid 是创建者,应用程序 id 是管理员 - Facebook API
我想知道是否有 Facebook API 调用来检索用户使用我的 facebook connect 应用程序创建的所有事件的事件 (eids)。
这些事件是使用以下 REST API 调用创建的:
https://api.facebook.com/method/events.create?event_info=' . $e_i . '&access_token=' . $cookie['access_token']
$e_i 是事件信息数组,其中“host”值设置为“Me”,如下所示
$event_info['host'] = 'Me';
在“创建者:”部分下的 Facebook 事件中,它列出了“我的用户名,应用程序名称”,我认为这是因为我是创建者,应用程序是管理员,如 REST api 文档中所述 http://developers.facebook.com/docs/reference/rest/events.create/
不幸的是,我似乎无法找出如何(REST 和 GPRAPH API)返回我是创建者且应用程序是管理员的事件列表,如上面的场景所示。如果可能的话,我将非常感谢有关如何完成此操作的一些帮助。
到目前为止,我已经尝试过:
- 使用 uid=application_id 的 REST API events.get。这只返回由应用程序创建的事件,而不返回包括创建它们的用户的事件
- GRAPH API
https://graph.facebook.com/me/events?fields=owner&access_token=...
此返回“我”的所有事件,但不包括应用程序也是管理员的情况。
奇怪的是,没有通过 API 引用事件创建者和事件管理员之间的链接,但在 Facebook 中,它能够拉取两者并将其显示在事件详细信息中。
I would like to know if there is a Facebook API call to retrieve the events (eids) for all the events a user has created using my facebook connect application.
The events are created using the following REST api call:
https://api.facebook.com/method/events.create?event_info=' . $e_i . '&access_token=' . $cookie['access_token']
$e_i is the event info array where the 'host' value is set to 'Me' as follows
$event_info['host'] = 'Me';
On Facebook events under the "Created by:" section it lists "My user name,Application Name", I presume this is because I am the creator and the application is the admin as stated in the REST api documentation http://developers.facebook.com/docs/reference/rest/events.create/
Unfortunately I cannot seem to find out how (neither REST nor GPRAPH API) to return a list of events where I am the creator and the application is the admin as in the above scenario. If this is possible I would really appreciate some assistance with how it is done.
So far I have tried:
- REST API events.get using uid=application_id. This only returns events created by the application not those including the user who created them
- GRAPH API
https://graph.facebook.com/me/events?fields=owner&access_token=...
this returns all the events for 'me' but not where the application is also the admin.
It seems strange that there's no reference to the linkage between the event creator and the event admin through the API but in Facebook it is able to pull both and display them on the event details.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用的是 Graph API,请尝试调用
$facebook->api('/App ID/events')
,它应该返回应用程序管理的所有事件 (http://developers.facebook.com)。 com/docs/reference/api/application/)。稍后您可以检查创建者的 ID 并将其与用户 ID 进行比较。
If you're using the Graph API try calling
$facebook->api('/App ID/events')
which should return all events managed by the application (http://developers.facebook.com/docs/reference/api/application/).Later on you can check the creator's ID and compare it with the User ID.