title: What are the prerequisites for Facebook stream.publish?
body: <p>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:</p>
  
  <pre><code>&lt;?php
  require_once 'facebook.php';
  $appapikey = 'xxxxxxx';
  $appsecret = 'xxxxxxx';
  $facebook = new Facebook($appapikey, $appsecret);
  $user_id = $facebook-&gt;require_login();
  
  
  $message = "Will this status show up and allow me to dominate the world?!";
  $uid = $user_id;
  echo $uid;
  $facebook-&gt;api_client-&gt;stream_publish($message,$uid);
  </code></pre>
  
  <p>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 <code>publish_stream</code> as well as  <code>offline_access</code> (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.</p>
  
  <p>-- The include is the official PHP Facebook library</p>