Browse files

Invalidate user data when a REST Server call expires

When using the REST API methods when an invalid access
token error was returned it never cleared the local session data which
in turn could end up in a nice loop.
  • Loading branch information...
1 parent 668c61a commit dafef11536c46a3b99fe5d3be06c226e9f86fe6b @scottmac scottmac committed Nov 1, 2011
Showing with 2 additions and 0 deletions.
  1. +2 −0 src/base_facebook.php
@@ -1042,6 +1042,8 @@ protected function throwAPIException($result) {
case 'OAuthException':
// OAuth 2.0 Draft 10 style
case 'invalid_token':
+ // REST server errors are just Exceptions
+ case 'Exception':
$message = $e->getMessage();
if ((strpos($message, 'Error validating access token') !== false) ||
(strpos($message, 'Invalid OAuth access token') !== false)) {

0 comments on commit dafef11

Please sign in to comment.