title: Get posts on a friend's wall using the Facebook API
body: <p>I'd like my Facebook app to take the ID of the user using the app, and find posts made by that ID on the wall of one of their friends (I'd prefer an example with an individual ID rather than iterative through all friends).</p>
  
  <p>I figure there's a good possibility that both users will have to provide permissions to the application to do this, and that's fine.</p>
  
  <p>I would prefer posts made directly on another user's wall, as well as any comments made on the target user's status updates / own wall posts.</p>
  
  <p>FQL would be preferable, but I can work with graph.
  I'm coding in PHP, but I can try to translate from another language if you know the solution in that.</p>
  
  <p>The code I'm currently using is:</p>
  
  <pre><code>SELECT message FROM stream WHERE source_id = &lt;FRIEND ID&gt; AND target_id = &lt;USER ID&gt;
  </code></pre>
  
  <p>I hardcoded <code>&lt;FRIEND ID&gt;</code> to a test ID (one of the developers), and I have tried with two other <code>&lt;USER ID&gt;</code>s (also developers), all users have read_stream permission given.
  I'm not sure, but I thought FQL would return an error if there wasn't permission. Either way, it just comes back blank / empty.</p>