我收到以下錯誤致命錯誤:在上線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
我該如何解決這個問題?