Hi, I'm wondering if someone would help me troubleshoot my test for stream.publish. I thought I had all the right pieces. Here's the code:
<?php
require_once 'facebook.php';
$appapikey = 'xxxxxxx';
$appsecret = 'xxxxxxx';
$facebook = new Facebook($appapikey, $appsecret);
$user_id = $facebook->require_login();
$message = "Will this status show up and allow me to dominate the world?!";
$uid = $user_id;
echo $uid;
$facebook->api_client->stream_publish($message,$uid);
What I'm expecting is my status to change to $message's content. What happens instead is that my UID is echo'd, and then it throws a 500 error. I've allowed publish_stream
as well as offline_access
(verified in my app settings, via my profile), the the API key hooks this small bit of code to my app. What other pieces do I need to make this simple example work? I'm finding the FB documentation a little hard to put together.
-- The include is the official PHP Facebook library