Facebook Data Deletion Request Callback with Django

Facebook provide a way to delete a user details from our apps and systems. Some time we use facebook login app for django authentication and its work perfect. But if the user want to delete his facebook book permission from his/her account we should provide a deletion request callback otherwise facebook may deactivate our facebook login app. I get the idea from original doc https://developers.facebook.com/docs/apps/delete-data/

We follow some steps how to create and apply Data deletion request callback with django

  1. Create a restfull django api url that facebook can send callback request
  2. Api url insert in developer.facebook.com
  3. Now delete app access from test facebook account check its work.

 

How to create Facebook Data Deletion Request Callback with Django api

In django api views.py file write below code

In urls.py file do this. Below django version 2

now build your call back url is like https://<websitename>.com/deauthtication

Second step:

Insert your https://<websitename>.com/deauthtication in developer.facebook.com app settings

facebook_deletion_callback

facebook_deletion_callback

Third step:

Go to your demo facebook account and remove your app.

Note : facebook app required https://websitename it not allow http . I inspired to write this article from here https://stackoverflow.com/questions/48609148/handle-facebook-deauthorize-callback-in-python

Shariful Islam Nayon

Shariful Islam | Full Stack Python/Django Developer I am Linux lover self motivated software craftsman open source contributor.My interested area Data Structure,Algorithm,Big data,Machine learning Dhaka, Bangladesh http://nayon.net/

Leave a Reply


Your email address will not be published. Required fields are marked *