Closed (fixed)
Project:
Facebook Connect
Version:
5.x-1.0-beta2
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Sep 2009 at 10:02 UTC
Updated:
3 Apr 2010 at 17:10 UTC
As per Facebook's guidelines, "any Facebook Connect site that stores data about the user must register a Post-Remove URL." This patch provides a new page, fbconnect/unlink, that processes Facebook's POST notification after a user has unauthorized the app by unlinking their Facebook account from the website's one.
Make sure to set "Post-Remove Callback URL" in your app's settings to "http://www.yourwebsite.com/fbconnect/unlink" for this to work.
| Comment | File | Size | Author |
|---|---|---|---|
| fbconnect-unlink.patch | 1.48 KB | jamix |
Comments
Comment #1
shroge commentedSince the 6.x version of the patch is based on this one I thought I'd post my comment here as well. Sorry for the duplication, but I thought you could take a look at the suggestion as well since it also applies to the 5.x version.
Original 6.x patch comment: http://drupal.org/node/574210
I was looking at implementing this patch on my site so I was taking a look at the patch and noticed that the deletion of the user was taking place with a direct db call:
db_query('DELETE FROM {fbconnect_users} WHERE uid = %d', $uid['uid']);
I was thinking that it might be better if that was done with the user_delete call and check that you do not delete the 0 or 1 user:
if ( !empty($uid['uid']) && $uid['uid'] > 1 ) { // do not want to remove 0 or 1 no matter what
user_delete(null,$uid['uid']);
}
That way, any place that the user info has gotten into (users_roles, authmap) will be removed and so that module_invoke_all is called. I know that my module will need to do a bit of cleanup if a user is deleted.
Comment #2
jamix commentedThank you for your suggestion. I have commented on it in the 6.x thread.
Comment #3
vectoroc commented