allora, faccio un ultimo tentativo perchè nn è possibile.
ho rifatto tutta la procedura.
nella mi app ho impostato (valori inventati):
-App display name => MIAPP
-App namespace => miapplication
-email => mia email di FB
-App domain => sito.it
-Categoria => altro
in Select how your app integrates with Facebook ho messo solo Website impostando l'indirizzo del sito di riferimento: http://www.sito.it
e queste sono le impostazioni Basic.
nelle impostazioni Auth Dialog ho messo solo la descrizione e Default Activity Privacy su Pubblica.
nn ho toccato nient'altro.
poi nella radice del sito ho messo questo:
Codice PHP:
<?php
if ($_SERVER['REQUEST_METHOD'] == "POST" && isset($_POST['btn_fb'])) {
include 'facebook.php';
$testo = $_POST['testo'];
echo $testo;
$facebook = new Facebook(array(
'appId' => 'APPID',
'secret' => 'APPSECRET',
'token' => 'TOKEN'
));
if (strlen(trim($testo)) > 0) {
try {
$facebook->api('/62162239572/feed', 'post', array('message' => $testo));
echo 'Messaggio inviato.';
} catch (FacebookApiException $e) {
echo $e->getMessage();
die();
}
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Prova FB</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<form action="<?php $_SERVER['PHP_SELF']; ?>" method="post">
<textarea name="testo">CIAO</textarea>
<input type="submit" value="Submit" name="btn_fb" />
</form>
</body>
</html>
nn è che c'è qualche altra impostazione che mi sfugge?
ho anche rirpovato ad andare qua:
https://graph.facebook.com/IDPAGES/...ess_token=TOKEN
e ottengo sempre lo stesso messaggio:
codice:
{
"error": {
"message": "You can only access the \"home\" connection for the current user.",
"type": "Exception"
}
}
eppure in fase di creazione del token mi chiede specficamente i permessi che otterrei e io acconsento.
ottengo la pagina con Success e prendo l'access_token.