I am getting the information to facebook graph api using file_get_contents()
but sometimes I am receiving an error.
I found out that cURL must be used instead of file_get_contents().
The problem is, I don't know how to use cURL with the URL that I need to pass.
if I converted
file_get_contents($graph_url);
into cURL, what will be the code?
here is the content of $graph_url
$graph_url= "https://graph.facebook.com/me/photos?"
. "url=" . urlencode($photo_url)
. "&message=" . urlencode('')
. "&method=POST"
. "&access_token=" .$access_token;