This issue has two parts:
Part 1:
When I remove the Facebook Application from my Facebook account while I am logged in Drupal then Drupal Crashes for me and shows the following error:
Error
<br>
The website encountered an unexpected error. Please try again later.
Error message
<br>
FacebookApiException: Invalid OAuth 2.0 Access Token in Facebook->_restserver() (line 515 of /[i_removed_path]sites/all/modules/facebook_stream/facebook-php-sdk/src/facebook.php).I had to logout so to not see this error again. But it has Session Expired in Block. What else do I need to do so to stop associating my account with Facebook? (This question is the Part 2)
Comments
Comment #1
zandros commentedThe
<br>in error is not displayed in the screen, I have typed in here by mistakeComment #2
Gravedigger commentedBefore uninstalling this plugin first you need to remove the api id and key and than uninstall, hope this will help.
Comment #3
marksward commentedException is being thrown at:
FacebookApiException: User must have accepted TOS in BaseFacebook->throwAPIException() (line 1106 of [myinstalldir]/sites/all/modules/facebook_stream/facebook-php-sdk/src/base_facebook.php).
Which is kind of valid, but the module needs to gracefully handle it - I still allow page rendering normally, but perhaps shown message in the Facebook block
Comment #4
marksward commentedputting try catch around the $block['content'] = _get_facebook_stream(); (approx line 355 in facebook_stream.module) lets you handle it more gracefully.
It appears the exception can occur if the user removes the app in Facebook whilst still in the Drupal site; removes the permisisons the module needs as part of the Facebook auth setup or have also seen it when the user selected 'deny' in the auth process