Facebook invites - who's invited whom
16,500
What about using FQL?
This query will get you the list of inviters for each invited user:
SELECT inviter, uid FROM event_member WHERE eid = <event_id> and inviter
You can use this query as basis. Order by inviter and count the records for each inviter. I know there's some work to do there, but I guess with a little bit of twicking the query, you'll be able to do it.
Author by
exussum
Updated on June 04, 2022Comments
-
exussum almost 2 years
I have an event on Facebook, generally it's shared to around 400 people and then people share further.
How can I track which user shares the most? I have seen answers for apps but I can't see the URL modifier which allows me to see who's invited whom to the event. On the main Facebook page, if you hover over someones name it tells you who invited them so Facebook must keep a record of this.
-
Avi about 11 yearsYou can also try using trick like the one in this link if you don't want to count the rows one-by-one: blogs.x2line.com/al/archive/2007/10/07/3287.aspx
-
exussum about 11 yearsFor some reasons all inviter are null - removing "and inviter" gives me all who is attending with "null" as inviter
-
Avi about 11 yearsThat happens because: 1. Either this is a group event (you're a member in a group that was invited to the event) 2. You don't have permissions to see the inviter. As a test I would suggest starting an event yourself and invite some users (or test users) and see if that works. When I had a look at your question I got nulls as well but then I saw that indeed I can't see the inviter in the facebook UI. So I had a look at another event with people I can see the inviters and there I saw the inviters.
-
exussum about 11 yearsIt will be a group Ill test with another one later today - Even with a group I see the person who send the invite to the group as xxxx (Invited you) so i thought it would show similar to that. This way looks promising though ! Thanks
-
Avi about 11 yearsSure :-) Tell us how it went.
-
DxCK about 11 yearsThanks for the answer. I tried it and "inviter" is always null. :(
-
Avi about 11 yearsAre you sure? Did you take an event for which you can see an inviter in the UI you used the same permissions as in the UI?
-
exussum about 11 yearsOk - I can confirm what DxCK says, The invite online shows that someone else invited people. The invite though the API only shows the one invite, The person who invited my account, Not the rest of the extra invites. The rest show as null. But online show as someone
-
Avi about 11 yearsDid you try it with the exact same permissions you're using in the UI? I would try with my own user and in the graph API explorer, try setting full permissions. I'm sure that's a permissions issue because I've tested it myself and it works. And unless facebook discriminates you, it should work for you too :)
-
exussum about 11 yearsYes, Signed in to the app as the same user as online. I can see my own information etc calling /me shows everything about my profile that i would expect
-
exussum about 11 yearsCode sample<pre>if ($user) { try { $query = array ("q" => "SELECT inviter,uid, rsvp_status FROM event_member WHERE eid = {THEID} and inviter"); $result = $facebook->api('/fql', "GET", $query); $user_profile = $facebook->api('/me'); } catch (FacebookApiException $e) { error_log($e); $user = null; } }</pre>
-
Avi about 11 yearsVery strange indeed. I double-checked it. Did you try doing it from the Graph API explorer? Just for sports...
-
exussum about 11 years{ "data": [ { "inviter": Id1, "uid": id2, "rsvp_status": "attending" } ] } Online there are 30 people attending who i can see who invited everyone
-
exussum about 11 yearsDo i need any extra permissions to see ones not directly related to me?
-
Avi about 11 yearsWell, if that is so then I have to admit I'm clueless from here. I hate to break it for you but I had a similar problem with something I was able to see from the UI but was returned null from the graph API. I opened a bug for facebook and I suggest you do it too. Even though my bug was deferred by facebook due to "lack in public interest" :/
-
Avi about 11 yearsAbout the permissions - when you use the access token, you're allowed to see whatever the user allowed to the see and that the user can see from the UI. If the user doesn't see something from the UI then of course, you can't too. If the user didn't give you the permissions to see something, then I guess that's obvious you can't.
-
exussum about 11 yearsTried it on an event i created, Got someone else to invite a third person, Surprisingly all null values. Weird
-
exussum about 11 yearsjust gave myself every permission possible, Then reloaded, with an event i created, and invited one person, When also invited 1 person. All null :( Seems to work fine for just me (ie who invited me)
-
Avi about 11 yearsI'm sorry to hear that :/ I would open a but to facebook.