使用cURL PHP / Graph API在Facebook上发表评论的回复 [英] Post a reply on a comment in Facebook using cURL PHP / Graph API

查看:283
本文介绍了使用cURL PHP / Graph API在Facebook上发表评论的回复的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道如何在朋友的墙上张贴动态消息。例如:

I know how to post a feed on the friend's wall. eg:

$url = 'https://graph.facebook.com/' . $fbId . '/feed';

$attachment =  array(
        'access_token'  => $accessToken,
        'message'       => $msg,
        'name'          => $name,
        'link'          => $link,
        'description'   => $desc,
        'picture'       => $logo,
);

// set the target url
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $attachment);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$go = curl_exec($ch);
curl_close ($ch);

$go = explode(":", $go);
$go = str_ireplace('"', '', $go[1]);
$go = str_ireplace('}', '', $go);
return $go;

但我想知道,如何使用cURL PHP或Facebook发布对特定Feed的回复

But I want to know, how to post a reply to the particular feed using cURL PHP or Facebook Graph API. Can anybody help me out from this problem?

推荐答案

您是否尝试过:

https://graph.facebook.com/。 $ go。 / comment

我想如果你可以发布一个带有 / feed ,那么您可以用 / comment url发表评论。

I think, if you can post a feed with /feed, then you can post comment with /comment url.

谢谢。

这篇关于使用cURL PHP / Graph API在Facebook上发表评论的回复的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆