0
I’m developing a php bot that takes the posts from a facebook page feed using Curl via GET request. I want to extract certain information from the page to then put in content and display on a good site that part I roll, but I don’t know if the Curl function returns an array or a string seems to me to be a string my doubt is Curl has some function to access the data returned by it or have to parse 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);
?>
mano she returns a json even I gave a var_dump and returned me a json that was even worth @Marcelo Bicudo
– user45474