Comment utiliser FB Graph pour afficher un message sur un stream (mur)

J'ai créé une application, et maintenant je souhaite publier un message sur l'un des murs de mes amis avec l'utilisation de la nouvelle API graphique. Est-ce capable?

J'utilise déjà oAuth et le Graph-api pour get une list de tous mes amis. L'API à http://developers.facebook.com/docs/api me dit de faire appel à https://graph.facebook.com/[userid]/feed pour lire le stream, mais il me dit aussi comment publier un message:

curl -F 'access_token=[...]' -F 'message=Hello, Arjun. I like this new API.' https://graph.facebook.com/arjun/feed 

Bien sûr, cela ne fonctionne pas! Et je ne peux pas savoir pourquoi …

Voici mon code PHP:

 require_once 'facebook.php'; // PHP-SDK downloaded from http://github.com/facebook/php-sdk $facebook = new Facebook(array(appId=>123, secret=>'secret')); $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); require_once 'facebook.php'; require_once 'facebook.php'; // PHP-SDK downloaded from http://github.com/facebook/php-sdk $facebook = new Facebook(array(appId=>123, secret=>'secret')); $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); // PHP-SDK téléchargé à partir de http://github.com/facebook/php-sdk require_once 'facebook.php'; // PHP-SDK downloaded from http://github.com/facebook/php-sdk $facebook = new Facebook(array(appId=>123, secret=>'secret')); $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); $ facebook = new Facebook (array (appId => 123, secret => 'secret')); require_once 'facebook.php'; // PHP-SDK downloaded from http://github.com/facebook/php-sdk $facebook = new Facebook(array(appId=>123, secret=>'secret')); $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); $ result = $ facebook-> api ( require_once 'facebook.php'; // PHP-SDK downloaded from http://github.com/facebook/php-sdk $facebook = new Facebook(array(appId=>123, secret=>'secret')); $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); '/ me / feed /', require_once 'facebook.php'; // PHP-SDK downloaded from http://github.com/facebook/php-sdk $facebook = new Facebook(array(appId=>123, secret=>'secret')); $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); array ('access_token' => $ this-> access_token, 'message' => 'Playing around with FB Graph ..') require_once 'facebook.php'; // PHP-SDK downloaded from http://github.com/facebook/php-sdk $facebook = new Facebook(array(appId=>123, secret=>'secret')); $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); 

Ce code ne lance aucune erreur et je sais que mon access_token est correct (sinon, je ne pourrais pas exécuter $ facebook-> api ('/ me? Access_token ='. $ This-> access_token); pour get mon object user.

Quelqu'un a-t-il affiché un message à l'aide de Graph-api? Ensuite, j'ai besoin de votre aide! 🙂

D'accord, j'ai finalement résolu cela. Thanx to phpfour pour votre aide 🙂

D'abord: Mon URL de connection ressemble à ceci (avec "publish_stream"):

 $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); $ connectUrl = $ this-> getUrl ( $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'www', $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'login.php', $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); array_merge (array ( $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'api_key' => $ this-> getAppId (), $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'cancel_url' => $ this-> getCurrentUrl (), $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'req_perms' => 'publish_stream', $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'afficher' => 'page', $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'fbconnect' => 1, $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'suivant' => $ this-> getCurrentUrl (), $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'return_session' => 1, $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'session_version' => 3, $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 'v' => '1.0', $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); ), $ params) $connectUrl = $this->getUrl( 'www', 'login.php', array_merge(array( 'api_key' => $this->getAppId(), 'cancel_url' => $this->getCurrentUrl(), 'req_perms' => 'publish_stream', 'display' => 'page', 'fbconnect' => 1, 'next' => $this->getCurrentUrl(), 'return_session' => 1, 'session_version' => 3, 'v' => '1.0', ), $params) ); 

Deuxièmement ; J'ai essayé de publier sur facebook via

 $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); $ result = $ facebook-> api ( $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); '/ me / feed /', $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); array ('access_token' => $ this-> access_token, 'message' => 'Playing around with FB Graph ..') $result = $facebook->api( '/me/feed/', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); 

Mais la bonne façon de le faire est d'inclure un autre paramètre ('post'):

 $result = $facebook->api( '/me/feed/', 'post', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); $ result = $ facebook-> api ( $result = $facebook->api( '/me/feed/', 'post', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); '/ me / feed /', $result = $facebook->api( '/me/feed/', 'post', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); array ('access_token' => $ this-> access_token, 'message' => 'Playing around with FB Graph ..') $result = $facebook->api( '/me/feed/', 'post', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..') ); 

Vous aurez besoin de l'autorisation étendue "publish_stream" afin d'écrire sur le stream. Voici une list complète de ceux-ci: http://developers.facebook.com/docs/authentication/permissions .

Afin d'get l'autorisation étendue, obtenez le jeton d'autorisation de cette manière:

 https://graph.facebook.com/oauth/authorize? client_id=...& redirect_uri=http://www.example.com/callback& scope=publish_stream https://graph.facebook.com/oauth/authorize? https://graph.facebook.com/oauth/authorize? client_id=...& redirect_uri=http://www.example.com/callback& scope=publish_stream client_id = ... & https://graph.facebook.com/oauth/authorize? client_id=...& redirect_uri=http://www.example.com/callback& scope=publish_stream redirect_uri = http: //www.example.com/callback& https://graph.facebook.com/oauth/authorize? client_id=...& redirect_uri=http://www.example.com/callback& scope=publish_stream 

Comme le dit le lien: entrez la description du lien ici

 <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> <? php <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ app_id = "YOUR_APP_ID"; <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ app_secret = "YOUR_APP_SECRET"; <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ my_url = "YOUR_POST_LOGIN_URL"; <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ code = $ _REQUEST ["code"]; <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> si (vide ($ code)) { <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> . <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ app_id. <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> "& redirect_uri =". <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> urlencode ($ my_url). <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> "& amp; scope = email"; <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> echo ("<script> top.location.href = '". $ dialog_url. "' </ script>"); <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ token_url = "https://graph.facebook.com/oauth/access_token?client_id=" <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> . <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ app_id. <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> "& redirect_uri =". <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> urlencode ($ my_url) <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> . <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> "& amp; client_secret =". <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ app_secret <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> . <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> "& amp; code =". <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ code; <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ access_token = file_get_contents ($ token_url); <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ graph_url = "https://graph.facebook.com/me/permissions?". $ access_token; <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> echo "graph_url =". <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ graph_url. <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> "<br />"; <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> $ user_permissions = json_decode (file_get_contents ($ graph_url)); <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> print_r ($ user_permissions); <?php $app_id = "YOUR_APP_ID"; $app_secret = "YOUR_APP_SECRET"; $my_url = "YOUR_POST_LOGIN_URL"; $code = $_REQUEST["code"]; if(empty($code)) { $dialog_url = "http://www.facebook.com/dialog/oauth?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;scope=email"; echo("<script>top.location.href='" . $dialog_url . "'</script>"); } $token_url = "https://graph.facebook.com/oauth/access_token?client_id=" . $app_id . "&amp;redirect_uri=" . urlencode($my_url) . "&amp;client_secret=" . $app_secret . "&amp;code=" . $code; $access_token = file_get_contents($token_url); $graph_url="https://graph.facebook.com/me/permissions?".$access_token; echo "graph_url=" . $graph_url . "<br />"; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?> 

Pour clarifier, 'post' se réfère ici à la méthode HTTP, comme dans GET / POST. Voir https://github.com/facebook/php-sdk/blob/master/src/base_facebook.php : fonction protégée _graph ($ path, $ method = 'GET', $ params = array ())

$ result = $ facebook-> api ('/ me / feed /', 'post', array ('access_token' => $ this-> access_token, 'message' => 'Playing around with FB Graph ..')) ;

En plus de chf ,

Après publication:

 $getLinkToken='https://graph.facebook.com/oauth/access_token'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&client_secret=YOUR_SECRET'. '&code=CODE_KEY'; $ getLinkToken = 'https: //graph.facebook.com/oauth/access_token'. $getLinkToken='https://graph.facebook.com/oauth/access_token'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&client_secret=YOUR_SECRET'. '&code=CODE_KEY'; '? client_id = YOUR_APPID'. $getLinkToken='https://graph.facebook.com/oauth/access_token'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&client_secret=YOUR_SECRET'. '&code=CODE_KEY'; '& redirect_uri = YOUR_SITE'. $getLinkToken='https://graph.facebook.com/oauth/access_token'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&client_secret=YOUR_SECRET'. '&code=CODE_KEY'; '& client_secret = YOUR_SECRET'. $getLinkToken='https://graph.facebook.com/oauth/access_token'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&client_secret=YOUR_SECRET'. '&code=CODE_KEY'; 

J'ai eu la réponse:

  https://graph.facebook.com/oauth/access_token? client_id=xxxxxxxxxxxxxx &redirect_uri=myurl &client_secret=xxxxxxxxxxxxxx &code=xxxxxxxxxxxxxx https://graph.facebook.com/oauth/access_token?  https://graph.facebook.com/oauth/access_token? client_id=xxxxxxxxxxxxxx &redirect_uri=myurl &client_secret=xxxxxxxxxxxxxx &code=xxxxxxxxxxxxxx client_id = xxxxxxxxxxxxxx  https://graph.facebook.com/oauth/access_token? client_id=xxxxxxxxxxxxxx &redirect_uri=myurl &client_secret=xxxxxxxxxxxxxx &code=xxxxxxxxxxxxxx & redirect_uri = myurl  https://graph.facebook.com/oauth/access_token? client_id=xxxxxxxxxxxxxx &redirect_uri=myurl &client_secret=xxxxxxxxxxxxxx &code=xxxxxxxxxxxxxx & client_secret = xxxxxxxxxxxxxx  https://graph.facebook.com/oauth/access_token? client_id=xxxxxxxxxxxxxx &redirect_uri=myurl &client_secret=xxxxxxxxxxxxxx &code=xxxxxxxxxxxxxx 

non lequel est access_token , client_secret ou code

 $facebook->api( '/YOUR_APPID/feed/', 'post', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..')); $ facebook-> api ('/ YOUR_APPID / feed /', 'post', $facebook->api( '/YOUR_APPID/feed/', 'post', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..')); array ('access_token' => $ this-> access_token, $facebook->api( '/YOUR_APPID/feed/', 'post', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..')); 

C'est une ancienne façon d'get l'access. Dans GRAPH, j'ai d'abord généré une key de code avec:

 $getLinkCode ='https://graph.facebook.com/oauth/authorize'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&scope=publish_stream'; $ getLinkCode = 'https: //graph.facebook.com/oauth/authorize'. $getLinkCode ='https://graph.facebook.com/oauth/authorize'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&scope=publish_stream'; '? client_id = YOUR_APPID'. $getLinkCode ='https://graph.facebook.com/oauth/authorize'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&scope=publish_stream'; '& redirect_uri = YOUR_SITE'. $getLinkCode ='https://graph.facebook.com/oauth/authorize'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&scope=publish_stream'; 

Et maintenant, lorsque nous avons une key de code, nous pouvons générer access_token à partir du lien:

 $getLinkToken='https://graph.facebook.com/oauth/access_token'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&client_secret=YOUR_SECRET'. '&code=CODE_KEY'; $ getLinkToken = 'https: //graph.facebook.com/oauth/access_token'. $getLinkToken='https://graph.facebook.com/oauth/access_token'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&client_secret=YOUR_SECRET'. '&code=CODE_KEY'; '? client_id = YOUR_APPID'. $getLinkToken='https://graph.facebook.com/oauth/access_token'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&client_secret=YOUR_SECRET'. '&code=CODE_KEY'; '& redirect_uri = YOUR_SITE'. $getLinkToken='https://graph.facebook.com/oauth/access_token'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&client_secret=YOUR_SECRET'. '&code=CODE_KEY'; '& client_secret = YOUR_SECRET'. $getLinkToken='https://graph.facebook.com/oauth/access_token'. '?client_id=YOUR_APPID'. '&redirect_uri=YOUR_SITE'. '&client_secret=YOUR_SECRET'. '&code=CODE_KEY'; 

Mais this access_token publie votre message comme USER NOT APPLICATION … POURQUOI ?!

Si vous souhaitez publier sur l'utilisation du mur d'application:

 $facebook->api( '/YOUR_APPID/feed/', 'post', array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..')); 

Au lieu d'utiliser le code ci-dessous

 [facebook dialog:@"feed" andParams:params andDelegate:self]; [boîte de dialog facebook: @ "feed" [facebook dialog:@"feed" andParams:params andDelegate:self]; andParams: params [facebook dialog:@"feed" andParams:params andDelegate:self]; 

Utilisez la solution suivante

 [facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];