3

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.

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 OAuthException: (#200) The user hasn't authorized the application to perform this action.

These same users can 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.

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:

$wall_info = $customer->getCustomWallData();

$attachment = array(
    'message' => $wall_info['msg'],
    'name' => $wall_info['link_title'],
    'caption' => $wall_info['link_caption'],
    'link' => $CUZ->index,
    'description' => '',
    'picture' => $CUZ->http . '/uploads/promo_logo/' . $wall_info['filename'],
    'actions' => array(
        array('name' => 'Get Search', 'link' => 'http://www.google.com')
    )
);

foreach($friendStack as $friend_data) {
    $friend_fb_id = $friend_data['fb_id'];
    $result = $facebook->api("/$friend_fb_id/feed/",'post',$attachment);
}

Does anyone here know:

  1. Why this is happening
  2. Whether there is any way to get around it to post to all the users
  3. If so, what this would be?

Thank you.

Kara
  • 6,115
  • 16
  • 50
  • 57

2 Answers2

3

Facebook blocks "spam" messaging. You cannot do bulk messages greater than 15 or 20 friends.

eabrand
  • 226
  • 3
  • 6
  • Well, yes, but by what criteria? We're not messaging random people by any stretch, rather a corporate client wants to give a gift to the people that signed up as their 'friend'. Does there exist any way at all to reach those people? – Damien Spracklin Mar 15 '11 at 21:23
  • Also: 15 or 20 friends per how long, or per session? – Damien Spracklin Mar 15 '11 at 22:01
  • Facebook doesn't reveal that information unfortunately. I would assume they don't so that spammers can't try to beat the system. I recommend sending 10-20 per hour and increasing or decreasing from there. I believe the more friends the person has and users you have, the higher amount of messages you can send. – eabrand Mar 17 '11 at 16:27
0

Well, I don't think that Facebook considers a message sent to more than 15 members as a spam message and blocks it.

There are certain applications which on single click promote themselves through a user's chat, wall post on every friend and each group joined by the user!

Jatin
  • 1