简体   繁体   中英

Post comment with Facebook PHP API

I can post in my wall , friend's wall... but i need post a comment with fabook php api, something like this:

POST : Helloo!
COMMENT : Hi!! <-PHP facebook API

POST in my wall :

$facebook->api('/feed/me/', 'post', array('message' => $message)); //Script running OK

POST in wall friend's:

$facebook->api('/ID_or_username_friend/feed/', 'post', array('message' => $message)); //Script running OK

but if use:

$facebook->api('/id_post/feed/', 'post', array('message' => $comment)); // nothing happens

they dont show any errors, but the comment is not posted :/ if i use another method i recive:

Uncaught OAuthException: Unknown path components:

any can help me ?

这是$facebook->api('/id_post/comments', ...

Look at the Post object documentation - to add a comment to a Post you need to make a POST request to /<POST ID>/comments

The only parameter is message , with the text of the comment the user typed in

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM