I am trying to like a Facebook post posted from an account. I have the oauth token of the account but i cant figure out how to like a post from my php code. I have a facebook app and also have the app id and app secret for my facebook app. I want to do this using the PHP SDK Version 5.0.0.
Can anyone please help with this or direct me to the some documentation apart from the one here - https://developers.facebook.com/docs/reference/php/5.0.0
Thanks
Surprisingly enough the approach that i commented on Navin's answer worked just fine now.When i had tried it previously i had gotten a 'Url not recognised' error.
My code is as follows-
$test=array(); $like=$fb->post('/'.$post_id.'/likes',$test,$token);
In the $like variable i get an object of FacebookResponse with a status of success or failure.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With