重複の可能性:
API 呼び出しによる FB アルバムの削除
アルバムから写真を削除することはできますが、Facebook グラフでアルバムを削除する際に問題があります (テストしたところ、正しく動作しました)。
写真を削除できて、アルバムを削除できないのはなぜですか? これは Facebook グラフ API の制限ですか、それとも特定の権限が必要ですか?
オブジェクトの削除にこのコードを使用し、写真で動作します
$graph_url = 'https://graph.facebook.com/'.$object_id.'?method=DELETE&'
. 'access_token='. $access_token;
$opts = array('http' =>
array(
'method' => 'DELETE',
'header' => 'Content-type: application/x-www-form-urlencoded',
'ignore_errors' => true
)
);
$context = stream_context_create( $opts );
$result = json_decode( file_get_contents( $graph_url, false, $context) );