Facebook tracking who Invited whom

2020-06-28 02:25发布

问题:

I have a Facebook app. Lets 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

回答1:

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.



回答2:

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/



标签: facebook