0

Facebookページをページとして単純に投稿しようとしています。

アプリを作成し、アクセス許可を設定し ( manage_pages )、アプリ トークンを要求しました ( https://developers.facebook.com/docs/facebook-login/access-tokens/経由)。

私はほとんどそこにいると思いますが、「PHP Fatal error: Uncaught OAuthException: (#200) The user has not Authorized the application to perform this action」というエラーが表示されます。

<?php
require_once('facebook.php');
$config = array();
$config['appId'] = 'xxxxxxxxxxxxx';
$config['secret'] = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$config['fileUpload'] = false; // optional
$facebook = new facebook($config);

$access_token = "app token I got from link above";
$facebook->setAccessToken($access_token);

$page_id = "xxxxxxxxxxxxxxxx";
$args = array(
        'access_token'  => $access_token,
        'message'       => "This is just a test.",
        'name' => "Just a test.",
        'link' => "http://www.xxxx.com/",
        'picture' => "http://www.xxxx.com/Logo.jpg",
        'actions' => array(
        'name' => 'See Pic',
        'link' => "http://www.xxxx.com/Logo.jpg"
        )

    );
   $post = $facebook->api("/$page_id/feed","post",$args);

ページに投稿できるように認証を与えるにはどこが欠けていますか? アプリのダッシュボードで設定を確認しましたが、何も不足していません。

ありがとう

4

0 に答える 0