Reputation: 1096
Facebook will begin to issue app-scoped user IDs when people first log into an instance of your app coded against v2.0 of the API. With app-scoped IDs, the ID for the same user will be different between apps.
When Invite a Friend, a request send like:{to[0]=10202585439492947, request=345936808908087}, i could get the recipient's id:10202585439492947, is it the recipient's App-scoped User ID?
The user's App-scoped User ID will always the same? If the user remove my app,then after several days, log into my app again, will the App-scoped User ID same as before?
I Want Rewarding the Sender and the Recipient,But if the App-scoped User ID changed between Sender send the invite and Recipient log into my app, I could locate who invite the new user.
Upvotes: 1
Views: 727
Reputation: 73984
I´ve just answered this in another thread: facebook javascript v2.0
It is an App Scoped ID, and it should stay the same even if the user deauthorizes and authorizes your App again. It will always be same in one App, but it will be different in another App. If you want to match IDs between different Apps, you can use the Business Mapping API: https://developers.facebook.com/docs/apps/for-business
Btw, you are only allowed to reward the Sender if the Recepient accepted the invite, nothing else. See the platform policy: https://developers.facebook.com/policy/ - 4.5 > click on the small question mark icon.
Careful though, if you are using "invitable_friends" you don´t get an App Scoped ID, but an "invite token": https://developers.facebook.com/docs/graph-api/reference/v2.1/user/invitable_friends
Edit: The Scoped ID may change if the user deauthorizes the App and authorizes it again after a long time, but you would need to delete his data anyway for privacy reasons.
Upvotes: 2
Reputation: 1570
If the user logs into your app like normal, it will remain the same. If the user uninstalls the application and then reauthenticates it at a later date, I believe the ID will be different from previous entries (or so I understand).
Upvotes: 0