Here is the code i have:
$message = urlencode($message);
$params[] = "message=".$message;
$params = implode('&',$params);
$curl = curl_init($this->graph_api.$object_id.'/comments?access_token='.$access_token);
curl_setopt($curl,CURLOPT_POST,true);
curl_setopt($curl,CURLOPT_POSTFIELDS,$params);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);
curl_setopt($curl,CURLOPT_SSL_VERIFYHOST,0);
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,0);
$response = curl_exec($curl);
curl_close($curl);
Currently there is problem with decoding i guess, when there is symbol in the comment reply for example:
comment: >>> contact
will output: & gt;& gt;& gt; contact (without space between & gt;)
same goes to other symbol. i think no problem with encode, only for decode. i'm not sure how this api graph works for decoding. really appreciated for any help.
and one more thing, for private_replies, is it possible to include url? because sometimes there is block/filter by facebook to avoid spamming i guess. any advice for this?