I have created an app, and now i want to post a message on one of my friends wall with use of the new Graph API. Is this do-able?
I am already using oAuth and the Gr
As the link says: enter link description here
<?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 . "&redirect_uri=" . urlencode($my_url) . "&scope=email";
echo("<script>top.location.href='" . $dialog_url . "'</script>");
}
$token_url = "https://graph.facebook.com/oauth/access_token?client_id="
. $app_id . "&redirect_uri=" . urlencode($my_url)
. "&client_secret=" . $app_secret
. "&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);
?>