开发者

How to make query "is uid X attending event Y"

How to make query "is uid X a开发者_JAVA技巧ttending event Y" with ASP.NET toolkit?

Do I need to use Facebook SQL?

I have an event with 5000+ members and I want to enumerate all friends of current users to see if they belong to this event.


This can be done with the graph API. Try a GET request in this form:

/[event id]/invited?user=[user_id]&access_token=[access_token]

It'll return a data structure with the rsvp_status if the user has RSVPed at all, including for public events where that user wasn't technically "invited." If the data structure is blank, then they haven't RSVPed at all.


The following FQL call should handle this:

select name from user where uid in(
 select uid from event_member where eid = EVENT_ID and uid in (
  select uid2 from friend where uid1 = FACEBOOK_UID
 )
)

where EVENT_ID is the event id you want and FACEBOOK_UID is the current user's user id.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜