I am a novice with the Facebook API. I have read so many tutorials and I am still confused.I find that I can post to the feed with API methods like this:
$data = array("message" => "Hello World!");
$status = $fb->api("/me/feed", "POST", $data);
and that is correct, second way is using cURL, something like this:
CURLOPT_URL => $url,
CURLOPT_POSTFIELDS => $params,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_VERBOSE
Which way is better?
This is a subjective question.
While using
curlmay seems good way (with more control on what’s going on) I personally prefer and recommend to use PHP-SDK for obvious reasons: