gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-11-30 05:13:17 24 4
gpt4 key购买 nike

我有一个用 php 编写的博客网站,它将新的博客文章发布到 Twitter,并在后台使用使用 php curl 传递的简单 http 发布请求自动执行博客 ping 操作。

我有一个博客网站的 facebook 页面,我想将更新发布到页面上的墙上,有没有简单的方法可以做到这一点?

我真正想要的是一个 url 和一组参数来打包为一个 http post 请求。

请注意,这是在新样式页面上发布到墙上,而不是个人资料。

最佳答案

github获取PHP SDK并运行以下代码:

<?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);

上面的代码会将消息发布到你的墙上......如果你想发布到你的 friend 或其他人的墙上然后用该用户的 Facebook 用户 ID 替换 me ..更多信息请查看 API 文档。

关于facebook - 你如何在 Facebook 页面上发布到墙上(不是个人资料),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/691425/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com