Howto use FB Graph to post a message on a feed (wall)

前端 未结 7 1735
谎友^
谎友^ 2020-12-23 12:50

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

7条回答
  •  清歌不尽
    2020-12-23 13:28

    As the link says: enter link description here

    top.location.href='" . $dialog_url . "'");
      }
      $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 . "
    "; $user_permissions = json_decode(file_get_contents($graph_url)); print_r($user_permissions); ?>

提交回复
热议问题