Hello.
I would like to know how to set my status using the Facebook Graph API and PHP, may be with the CURL function??
Thanks!!
Hello.
I would like to know how to set my status using the Facebook Graph API and PHP, may be with the CURL function??
Thanks!!
http://developers.facebook.com/docs/api#publishing
curl -F 'access_token=...' \
-F 'message=Hello, Arjun. I like this new API.' \
https://graph.facebook.com/arjun/feed
Using the new PHP SDK you can do:
<?php
require './facebook.php';
$fb = new Facebook(array(
'appId' => 'YOUR APP ID',
'secret' => 'YOUR API SECRET',
'cookie' => true, // enable optional cookie support
));
$post = $fb->api('me/feed', 'POST', array('message' => 'hello world!'));
The various parameters are documented at the bottom here.
Giving a try to what I found here:
Seems to be the most razonable and simple solution.
Again, copying and pasting from Facebook documentation isn't giving an example, because their documentation it's not good as it should be, in other words, it's poor and the asume to many things.
Also thanks to you Daku.
The solution can be something like the post above:
$result = $facebook->api(
'/me/feed/',
'post',
array('access_token' => $this->access_token, 'message' => 'Playing around with FB Graph..')
);