I am not able to post with the Facebook API

0

Blz galera. I registered with Facebook developers to use the Graph API Explorer. I make the Token generation, I get the id of the page and using the two codes below, both of them do not work (the page is blank). With the same codes, I managed to do two postings on the first day and then I could not get any more, except getting a return (error 100 error_subcode with value 33). I noticed when when I get a user token, at the time giving permissions in the popup window of my facebook I am getting this warning: "Send to login evaluation Some of the permissions below have not been approved by Facebook. Send me an analysis now or know more. "I have sent the application to analyze the feedback I am getting and that I do not need these checks to use the manager_pages and the publish page ... What can I do? / p>

1.php code     

$page_id = '91387654765491';

// E as informações do que será postado.
$data['picture'] = "http://www.animeseries.com.br/images/animes/00002.jpg";
$data['link'] = "http://www.animeseries.com.br/";
$data['message'] = "Bleach";
$data['caption'] = "Dublado e Legendado";
$data['description'] = "";

$data['access_token'] = $page_access_token;
$post_url = 'https://graph.facebook.com/'.$page_id.'/feed';

// E pra finalizar fazemos o post para o Facebook:

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($ch);
curl_close($ch);
?>

2.php code

<?php
$page_access_token = '9546546522112884';
$page_id = 'Efdasgsfdghgfjhdfghfdagsgadc7yfYEuk6v3SeIjb5hvZAs7syDoN4rznPMujk4I9MSoRtT9DUBPVCUl9TvsuMXLEWRPmkyT4cnEZD';

// Monta o post do FB
$data['message'] = "Bleach";

// uma imagem para o seu post (opcional)
$data['picture'] = "http://www.animeseries.com.br/images/animes/00002.jpg";

// um link para quando clicarem no seu post
$data['link'] = "http://www.animeseries.com.br/";

// descrição do post
$data['description'] = "";

// subtítulo
$data['caption'] = "Dublado e Legendado";

$data['access_token'] = $page_access_token;

// Efetua a chamada da API
$post_url = 'https://graph.facebook.com/'.$page_id.'/feed';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$return = curl_exec($ch);

// Escreve na tela o retorno da API
echo($return);

curl_close($ch);
?>
    
asked by anonymous 07.02.2018 / 16:26

0 answers