在
PHP中,我使用curl将删除发送到fb图形api – 然而我收到以下错误;
{"error":{"type":"GraphMethodException","message":"Unsupported delete request."}}
我正在使用的代码是;
$ch = curl_init("https://graph.facebook.com/" . $status_id . ""); curl_setopt($ch,CURLOPT_VERBOSE,1); curl_setopt($ch,CURLOPT_RETURNTRANSFER,CURLOPT_HEADER,0); curl_setopt($ch,CURLOPT_TIMEOUT,120); curl_setopt($ch,CURLOPT_POST,1); curl_setopt($ch,CURLOPT_POSTFIELDS,$query); curl_setopt($ch,CURLOPT_CUSTOMREQUEST,"DELETE"); curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,1); curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,CURLOPT_CAINFO,NULL); curl_setopt($ch,CURLOPT_CAPATH,CURLOPT_FOLLOWLOCATION,0); $result = curl_exec($ch); echo $result;
$query包含访问令牌.
固定!
原文链接:https://www.f2er.com/php/133181.html删除https://graph.facebook.com/673509687_104812882909249?access_token= {access_token}哪里673509687是我的userID,104812882909249是objectID