私は通常、以下のコードを使用して壁に写真を投稿します
$attachments = array(
'message' => $mess,
'access_token' => $access_token
);
$facebook->setFileUploadSupport(true);
$attachments['image'] ='@'.realpath($filename);
$photoz = $facebook->api('/'.$aid.'/photos', 'POST', $attachments);
私はGoogleアプリエンジンを使用しているため、上記は機能しないため、以下の方法に従いました
$filename ="prof.jpg";
$im ='@'.realpath($filename);
$post = "https://graph.facebook.com/".$aid."/photos?access_token=".$access_token."&message=hellohi&source=".$im."&method=POST";
$upload = fetch_url($post);
echo $upload;
しかし、エラー #324) Requires upload file","type":"OAuthException","code":32 が表示された場合
理由は何ですか?どこが間違っているのですか?
ps - $im は、@/base/data/home/apps/s~myphotoapp/1.362007154292719350/prof.jpg を返します。