Reclaiming Accounts
From Facebook Developer Wiki
As an owner of an independent website, it's important that after a user starts a relationship with your site, that user is always able to come back to it. For this reason, we've implemented functionality for Facebook Connect site owners to provide a simple flow for Facebook users to set up an independent account, in the unlikely case that a user decides to deactivate their Facebook account.
[edit] Enabling Account Reclamation
In order to enable account reclamation, provide a URL in the Account Reclamation URL field in the Connect tab in your application settings. You should receive two GET parameters when a user deactivates his or her Facebook account:
- &u: this parameter contains the user ID of the user trying to set up an independent account),
- &h: this parameter contains the md5 hash of the user ID concatenated with your application secret.
When your site receives a request containing the GET parameters, you should verify that the request is legitimate by validating that the hash is correct. The PHP client library contains a simple helper function called verify_account_reclamation() that you use to perform this validation. You need to provide the user ID and the hash with this call. Once you validate the request, you can take the user through the steps necessary to create login credentials and any other information you may need.
[edit] How a User Receives a Reclamation URL
When a user deactivates his or her Facebook account, Facebook sends the user an email regarding the deactivation. If the user has connected accounts with any Facebook Connect sites, and any of those sites has specified an account reclamation URL, the email will contain a section with the application's logo, name, and reclamation link, in addition to an explanation about the link's purpose.
Note: Account reclamation works only when a user deactivates his or her Facebook account. It does not work when a user disconnects his or her Facebook account from your site.
