Facebook Graph API-用户创建的事件 [英] Facebook Graph API - Events created by user

查看:89
本文介绍了Facebook Graph API-用户创建的事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试获取用户使用Graph API创建的所有事件.使用FQL,我可以调用以下命令:

I'm trying to get all the events created by a user using the Graph API. With FQL I can call the following:

SELECT name, location, description
FROM event WHERE creator = me()
AND start_time > now()
ORDER BY start_time';

但是FQL自v2.1起已被弃用.

But FQL has been deprecated as of v2.1.

似乎没有使用Graph API进行记录的方法.呼唤 /{user-id}/events给出了用户将要去往的所有事件的列表,但是我找不到一种将其仅过滤到用户创建的事件的方法.有没有人设法做类似的事情?

There doesn't seem to be a documented way of doing this with the Graph API. Calling /{user-id}/events gives a list of all the events a user is going to, but I can't find a way of filtering it to only events created by the user. Has anybody managed to do something similar?

推荐答案

我今天早上也遇到了同样的问题. 在搜索和进行大量R& D时,我发现了一些很好的最终解决方案,可以使用graph-api获取事件.

Hi i have also faced same problem today morning. While searching and doing lots of R&D i found some good and final solution to fetch events with graph-api.

尝试使用以下网址查找比您的日期还重要的事件.

Try using below url to find the events which are greater then your date.

https://graph.facebook.com/v2.4/USERID/events?access_token=URACCESSTOKEN&fields=id,name,description,start_time,end_time,place&since=YOURSATRTDATE

注意:

  1. fields参数在v2.4中是必需的.
  2. 因为日期应为unix时间戳.

这篇关于Facebook Graph API-用户创建的事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆