且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

你如何在 facebook 页面(不是个人资料)上发布到墙上

更新时间:2023-12-02 18:12:10

github 并运行以下代码:

Get PHP SDK from github and run the following code:

<?php
$attachment = array(
    'message' => 'this is my message',
    'name' => 'This is my demo Facebook application!',
    'caption' => "Caption of the Post",
    'link' => 'http://mylink.com',
    'description' => 'this is a description',
    'picture' => 'http://mysite.com/pic.gif',
    'actions' => array(
        array(
            'name' => 'Get Search',
            'link' => 'http://www.google.com'
        )
    )
);

$result = $facebook->api('/me/feed/', 'post', $attachment);

上面的代码会将消息发布到您的墙上...如果您想发布到您的朋友或其他人的墙上,请将 me 替换为该用户的 Facebook 用户 ID..for更多信息请查看 API 文档.

the above code will Post the message on to your wall... and if you want to post onto your friends or others wall then replace me with the Facebook User Id of that user..for further information look out the API Documentation.