title: How can a Facebook application send a message to all of a user's friends?
body: <p>We're trying to construct an application that can - at the request of logged-in users with the appropriate blessings within the app - send out a message to any or all of the user's FB friends declaring that they have been sent a gift.</p>
  
  <p>We have been able to get this to work for sending just a small few friends this message, as a wall post (notifications and messages are unavailable in the API). However, with any number of friends larger than ~15, the majority of the users return an <code>OAuthException: (#200) The user hasn't authorized the application to perform this action</code>.</p>
  
  <p>These same users <em>can</em> be sent the message individually or in a small group. However, we expect to have this feature used by users with hundreds or even thousands of friends.</p>
  
  <p>The API docs have not been forthcoming, especially since they are stuck halfway between the old and new Graph interfaces. We are currently using the following code (in precis) to make the API requests, in PHP, in the presence of a current Facebook session with the credentials of our user:</p>
  
  <pre><code>$wall_info = $customer-&gt;getCustomWallData();
  
  $attachment = array(
      'message' =&gt; $wall_info['msg'],
      'name' =&gt; $wall_info['link_title'],
      'caption' =&gt; $wall_info['link_caption'],
      'link' =&gt; $CUZ-&gt;index,
      'description' =&gt; '',
      'picture' =&gt; $CUZ-&gt;http . '/uploads/promo_logo/' . $wall_info['filename'],
      'actions' =&gt; array(
          array('name' =&gt; 'Get Search', 'link' =&gt; 'http://www.google.com')
      )
  );
  
  foreach($friendStack as $friend_data) {
      $friend_fb_id = $friend_data['fb_id'];
      $result = $facebook-&gt;api("/$friend_fb_id/feed/",'post',$attachment);
  }
  </code></pre>
  
  <p>Does anyone here know: </p>
  
  <ol>
  <li>Why this is happening  </li>
  <li>Whether there is any way to get around it to post to <em>all</em> the users  </li>
  <li>If so, what this would be?</li>
  </ol>
  
  <p>Thank you.</p>