I'm developing a bot in php that takes the feed posts from a facebook page using curl via GET request. I want to extract certain information from the page to later put in content and display on a good site that part I unroll, but I do not know if the curl function returns an array or a string seems to be a string my doubts is the curl has some function to access the data returned by it or do you have to do a parse in the content? the bot request code:
<?php
define("VERSAO", "/v2.10", TRUE);
define("PAGINA", "/resultadojogodobicho", TRUE);
define("GRAPH", "?fields=feed{full_picture,message}", TRUE);
define("ACCESS_TOKEN", "&access_token=...", TRUE);
define("URL", "https://graph.facebook.com", TRUE);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, URL.VERSAO.PAGINA.GRAPH.ACCESS_TOKEN);
curl_setopt($ch, CURLOPT_POST, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($ch);
if($return){
echo 1;
}else{
echo 0;
}
curl_close($ch);
?>