I am using fb module and am very happy with it.

I need to know though what happens when a user de-authorizes the application on facebook. For example on my site people sign in with their facebook account and create content. In which case I display that user's facebook thumbnail picture next to all the content created by him. Say that after a month he de-authorizes my app, what would happen? I tried searching for this but didnt find any info, nor any on the readme.txt file. Basically I would like to keep showing that person's content on my site, but would also like to display "Annonymous" thumbnail instead of that user's facebook thumbnail. Is all that done automatically? I assume de-authorization basically removes a record from fb_user table for that user, but is that all being done? if done in this manner at all.

Any info like to which event to listen to, how it works in general would be much appreciated.

Thanks!

Comments

Dave Cohen’s picture

Category: support » feature
Status: Needs review » Active
Issue tags: +get involved

De-authorizing does not remove the entry from fb_user table. It does not delete the drupal user account. So, if the user re-authorizes the application, they will be re-authorized as the same user they were originally.

Right now, the modules do not provide any options to do more on a de-authorize event. There is an event, and if the server receives it from facebook, it will call hook_fb() with $op == FB_APP_OP_EVENT, forwarding the data received from facebook. So you could write a custom hook that looks for the de-authorize event and delete the user account in response.

I'd be open to a patch to fb_user.module that does this, as long as it is a configurable option and not the default behavior.

So after de-authorizing, the user account remains intact. You should be able to still see the user's profile pic. (But who can see that always depends on the user's privacy policy on facebook).

hacmx’s picture

Is possible to delete drupal user when de-authorize the app?.
Where to start?.
thanks!!