0
這是我的許可代碼:Facebook應用錯誤
$permissions = $facebook->api("/me/permissions");
if(@array_key_exists('publish_stream', $permissions['data'][0])) {
// Permission is granted!
// Do the related task
} else {
// We don't have the permission
// Alert the user or ask for the permission!
echo '<script>
window.location.replace("facebook.com/dialog/oauth?client_id=257378464344747&redirect_uri=https://www.facebook.com/pages/Test-Matyii/399406486739482?sk=app_257378464344747&scope=email,publish_stream");
</script>' ;
}
但我有錯誤:
Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in /app/www/sdk/src/base_facebook.php on line 1106
您必須提供有效的' access_token'到你的'$ facebook-api'調用 – scibuff 2012-03-10 12:12:53
Wheres第一行之前的代碼? – 2012-03-12 03:34:01