摘要:透過 FB FQL 查詢透過某 App 邀請了幾個好友
大致上 FQL 長這樣
SELECT uid FROM user WHERE uid IN ( SELECT recipient_uid FROM apprequest WHERE recipient_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND app_id = YOUR_APP_ID)
再來統計 data 有幾筆即可
如果要做成可以針對不同活動,查詢各活動各邀請了多少好友,可以在「邀請」時在 data 參數加上 keyword
那麼只要稍微改一下FQL,如下即可
SELECT uid FROM user WHERE uid IN ( SELECT recipient_uid FROM apprequest WHERE recipient_uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND app_id = YOUR_APP_ID AND data = 'KEYWORD')
PS. 如果是透過 Graph API Explorer 測試,記得把 應用程式 改成要查詢的 App,不然會查不到