file_get_contents() を使用して Facebook グラフ API に情報を取得しています
しかし、時々エラーが発生します。
file_get_contents() の代わりに cURL を使用する必要があることがわかりました。
問題は、渡す必要がある URL で cURL を使用する方法がわからないことです。
私が変換した場合
file_get_contents($graph_url);
cURL に変換すると、コードはどうなりますか?
ここに $graph_url のコンテンツがあります
$graph_url= "https://graph.facebook.com/me/photos?"
. "url=" . urlencode($photo_url)
. "&message=" . urlencode('')
. "&method=POST"
. "&access_token=" .$access_token;