Facebook tracking who Invited whom
I have a Facebook app. Le开发者_C百科ts say user A invites user B, and user C also invites user B to use a Facebook app.
User B clicks on user C's invite and accepts it.
How do I check this? I'd like to assign the referral to user C.
I can't find anything on Facebook forums.
PHP SDK
I suppose that you are using the FB native window to send the invitations. As this window allows you to set the URL of the buttons, you can just append some parameters to the URL.
For example, for the accept invitation button:
http://apps.facebook.com/myappname/?invited_by=123456
Where 123456 would be the FB uid of the user who sent the invitation.
If a user clicks 'Accept' on a request, they will be sent to the canvas URL of the application that sent the request. This URL will contain an additional parameter, request_ids, which is a comma delimited list of Request IDs that a user is trying to act upon:
http://apps.facebook.com/[app_name]/?request_ids=[request_ids]
FB docs: http://developers.facebook.com/docs/reference/dialogs/requests/
精彩评论