使用cURL PHP / Graph API在Facebook上发表评论回复
发布时间:2020-12-14 01:21:52 所属栏目:Linux 来源:网络整理
导读:我知道如何在朋友的墙上发布信息.例如: $url = 'https://graph.facebook.com/' . $fbId . '/feed';$attachment = array( 'access_token' = $accessToken,'message' = $msg,'name' = $name,'link' = $link,'description' = $desc,'picture' = $logo,);// set
我知道如何在朋友的墙上发布信息.例如:
$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 Graph API发布对特定Feed的回复.任何人都可以帮我解决这个问题吗? 解决方法
你试过这个:
https://graph.facebook.com/“.$go.”/评论 我想,如果您可以使用/ feed发布Feed,那么您可以使用/ comment url发表评论. 谢谢. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |