I have to do a job where I have to create a code that captures friends / post / tanned and sharing a page on facebook and save it to the database, but I need to do it with more than one page. I have an example that started working for a specific page. But now this is not working, even if I renew the token, could anyone help? Code below:
<html>
<head></head>
<body>
<?php
$url = "146659712053598";
$token="Aqui_Fica_o_Token"
// Faz a requisição para API do Facebook
$postagens = file("https://graph.facebook.com/".$url."/posts?access_token=".$token);
$amigos = file("https://graph.facebook.com/".$url."/friends? access_token=".$token);
$curtidas= file("https://graph.facebook.com/".$url."/likes?access_token=".$token);
// Decodifica o retorno em JSON
$json = json_decode($retorno, false);
// Retorna o Número de Likes
echo $postagens[0];
echo"<br>";
//echo $amigos[0];
echo $curtidas[0];
?>
</body>
</html>