私は自分のウェブサイトを介してFacebookに投稿を公開しようとしています。
私はこれらの権限を持っています
'scope' => 'read_stream, email, publish_stream, user_birthday, user_location, user_work_history, user_hometown, user_photos',
しかし、投稿を公開できません。以下の例は公開できません。
if(isset($_POST['publish'])){
try{
$statusUpdate = $facebook->api("/$user/feed", 'post', array(
'message' => 'Message here',
'link' => 'webiste link here',
'picture' => 'image link here',
'name' => 'Heading',
'caption' => 'example.com',
'description' => 'bla bla bla bla',
));
}catch(FacebookApiException $e){
error_log($e);
}
}
しかし、メッセージだけで簡単な投稿(ステータス)を投稿することに成功しました
if(isset($_POST['status'])){
try{
$statusUpdate = $facebook->api("/$user/feed", 'post', array('message'=> $_POST['status']));
}catch(FacebookApiException $e){
error_log($e);
}
}
追加の許可が必要か、不足しているものを誰か教えてもらえますか?
Graph API を使用すると、このエラーが発生します
{
"error": {
"message": "(#100) The post's links must direct to the application's connect or canvas URL.",
"type": "OAuthException",
"code": 100
}
}
私の中で私はこれをerror_log.php
見つけました
OAuthException: (#100) 投稿のリンクは、アプリケーションの接続 URL またはキャンバス URL を指している必要があります。