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>' ;
}
しかし、私はエラーがあります:あなたは正しく、例えば必ずセットアップPHP SDKにする必要があり
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
を持つユーザのログインを持っている必要があります場合は、 '有効を指定する必要がありますあなたの '$ facebook-api'コールに' access_token'を書いてください – scibuff
あなたの最初の行の前に来るコードを作成しますか? –