Filippo oretti
Filippo oretti

Reputation: 49843

Facebook connect and account remove

I have a website where users can log in with the Facebook oAuth API.

Once the user logs in or registers via Facebook it is stored in my database.

But what I'd like to achieve is, once the user goes to his Facebook application settings page and removes my website app permissions, the used should also be deleted from my database.

Is there any work around to this problem, if this is not possible via the Facebook oAuth API?

Upvotes: 0

Views: 136

Answers (2)

Anvesh Saxena
Anvesh Saxena

Reputation: 4466

You can add Deauthorise Callback URL by Navigating to Settings > Advanced section of your application. Whenever a User Deauthorises your Facebook app, Facebook performs a HTTP POST of signed request to your URL. You may use the field user_id to determine which User has deauthorised your app.

Upvotes: 2

David K.
David K.

Reputation: 324

Actually, I would do the following:

  1. Add a date to his last log in to your site.
  2. Have cron job check for old, unused accounts.
  3. Send an email to the user's email address (or Facebook message mail) telling him his account is due to expire soon.
  4. Delete account from database.

Upvotes: 1

Related Questions