1

大家好,我对“POST TO WALL”有很大的疑问。有人可以告诉我怎么做吗?

<?php

 $app_id = "myappid";

 $canvas_page = "mycanvaspage";

 $auth_url = "https://www.facebook.com/dialog/oauth?client_id=" 
        . $app_id . "&redirect_uri=" . urlencode($canvas_page);

 $signed_request = $_REQUEST["signed_request"];

 list($encoded_sig, $payload) = explode('.', $signed_request, 2); 

 $data = json_decode(base64_decode(strtr($payload, '-_', '+/')), true);

 if (empty($data["user_id"])) {
        echo("<script> top.location.href='" . $auth_url . "'</script>");
  ?>

我知道如何使用对话窗口制作 POST TO WALL 但有人可以告诉我如何在没有它的情况下制作它吗?

4

1 回答 1

0

使用 facebook php lib 并发布流权限:

try {
     $facebook -> api ('/' . $fbID . '/feed', 'POST', $post);
       #where $post is array like array('name' => 'test' , 'description' => 'test');
    } catch (FacebookApiException $e) {
     #if eny error
         #u can get it $e -> getMessage() 
    }
于 2012-07-18T11:09:26.690 回答