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.

Share:
16,500
exussum
Author by

exussum

Updated on June 04, 2022

Comments

  • exussum
    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
    Avi about 11 years
    You 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
    exussum about 11 years
    For some reasons all inviter are null - removing "and inviter" gives me all who is attending with "null" as inviter
  • Avi
    Avi about 11 years
    That 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
    exussum about 11 years
    It 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
    Avi about 11 years
    Sure :-) Tell us how it went.
  • DxCK
    DxCK about 11 years
    Thanks for the answer. I tried it and "inviter" is always null. :(
  • Avi
    Avi about 11 years
    Are 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
    exussum about 11 years
    Ok - 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
    Avi about 11 years
    Did 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
    exussum about 11 years
    Yes, 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
    exussum about 11 years
    Code 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
    Avi about 11 years
    Very strange indeed. I double-checked it. Did you try doing it from the Graph API explorer? Just for sports...
  • exussum
    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
    exussum about 11 years
    Do i need any extra permissions to see ones not directly related to me?
  • Avi
    Avi about 11 years
    Well, 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
    Avi about 11 years
    About 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
    exussum about 11 years
    Tried it on an event i created, Got someone else to invite a third person, Surprisingly all null values. Weird
  • exussum
    exussum about 11 years
    just 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
    Avi about 11 years
    I'm sorry to hear that :/ I would open a but to facebook.