我收到以下错误致命错误:在上线1039 base_facebook.php
Uncaught OAuthException: An active access token must be used to query information about the current user.
我的框架应用程序包括两个页面 - index.php
和index1.php
。默认情况下,当index.php
负载,它已在顶部下面的链接继续index1.php
:
<a href="index1.php">index1</a>
而且下面的代码:
<?PHP
include("facebook.php");
$config = array();
$config['appId'] =$appId;
$config['secret'] = $appSecret;
$fb = new Facebook($config);
$access_token = $fb->getAccessToken();
$user_profile = $fb->api('/me','GET');
$userid = $fb->getUser();
?>
index1.php
具有作为的index.php是具有顶部相同的代码。
当我加载应用程序它不给任何错误和负荷完美,但是当我在链接点击index1.php
它给
Uncaught OAuthException: An active access token must be used to query information about the current user in base_facebook.php at 1039
我该如何解决这个问题?