我建立在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我会错了。 你能帮我吗?
我升级SDK版本,但仍然错误点代码:$ E =新FacebookApiException($结果); – 2014-10-08 13:00:58