如何使用FB Graph API从参加活动计算出来的客人?

Zaq*_*uPL 3 facebook facebook-graph-api facebook-javascript-sdk facebook-php-sdk

我想通过使用Facebook Graph API v2.1来参加活动.我不能使用FQL查询,因为它在当前版本之后已被弃用.

我可以使用/ {event-id} /参加和总结所有客人,但这个解决方案非常无效(查询执行很长时间 - 通常> 2000毫秒,它只适用于~1000位客人,而不是更多).

Nir*_*hah 13

如果您调用事件ID本身,则可以为其添加字段attending_count,declined_countmaybe_count轻松获取总计.

例:

https://graph.facebook.com/{event_id}?fields=attending_count,declined_count,maybe_count
Run Code Online (Sandbox Code Playgroud)

如果我执行以下操作:

https://graph.facebook.com/468185256651918?fields=attending_count,declined_count,maybe_count
Run Code Online (Sandbox Code Playgroud)

我知道了:

{
  "attending_count": 304, 
  "declined_count": 277, 
  "maybe_count": 97, 
  "start_time": "2014-09-06T20:00:00+0100", 
  "id": "468185256651918"
}
Run Code Online (Sandbox Code Playgroud)