I'm very confused with this facebook api.
I've facebook username and password in my database, I want to sign and post content from my site to my facebook wall. how do I do it?
I've downloaded the facebook-php-sdk, just need to be able to include the "post" part in my php file to make things happen, I've this code at the moment
require_once ('facebook.php');
$app_id = "MY_ID";
$app_secret = "MY_SECRET";
$facebook = new Facebook(array('appId' => $app_id, 'secret' => $app_secret, 'cookie' => true));
if(is_null($facebook->getUser())) {
header("Location:{$facebook->getLoginUrl(array('req_perms' => 'user_status,publish_stream,user_photos'))}");
exit;
}
$status = $facebook->api('/me/feed', 'POST', array('message' => utf8_encode($my_message)));
with this I just get a internal server error, nothing more to have an idea of what I'm doing wrong...
even with var_dump($status) I get nothing Thanks