2014-10-08 85 views
0

我建立在Facebook上的應用程序,這給了我這個錯誤:未捕獲OAuthException事

"Fatal error: Uncaught OAuthBaseException: An active access token must be used to query information about the current user. Thrown in /membri/mercatinoalto/base_facebook.php on line 1254"

點擊一個按鈕,打開文件裏面調用文件「facebook.php」時。 此文件召回另一個文件'base_facebook.php':

... require_once「base_facebook.php」; ...

在 'base_facebook.php',在行1254我找到這個函數:

   protected function throwAPIException ($ result) {

     $ e = new FacebookApiException ($ result);

     switch ($ e-> getType()) {        // OAuth 2.0 draft 00 style

       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) ||

             (strpos ($ message, 'An active access token must be used')! == false)

        ) {            $ this> destroySession();          }

         break;      }

我找不到wher我會錯了。 你能幫我嗎?

+0

我升級SDK版本,但仍然錯誤點代碼:$ E =新FacebookApiException($結果); – 2014-10-08 13:00:58

回答

相關問題