tags:

views:

508

answers:

1

Using the API call notifications.sendEmail you can send an email to a application user that has authorised your app and granted the "email" extended permission.

Now lets pretend that I have 10 users I need to send an email to. 5 have given me this permission and 5 haven't. Is it necessary that I query FB to see if each user has given my app this permission - or can I just pass all the IDS to the sendEmail method and trust FB to send email to the 5? Will the call fail if there are any non-approved users passed?

$result = $facebook->api_client->notifications_sendEmail( 
    $user_list, 
    "The Subject", 
    "This should appear in the body (plain text)", 
    "<b><i><u>this should appear in the body</u></i></b> (HTML)"
);
A: 

http://wiki.developers.facebook.com/index.php/Notifications.sendEmail

Quote:

Returns a comma-separated list of the recipients to whom the email was successfully sent.

You can provide user IDs for users that have not granted you the email extended permission. They wouldn't get the email, but nothing else would happen. Obviously, those IDs would not appear in the return value (look at the quote above).

Lior Cohen
duh, and I linked to the page too!
Xeoncross
It happens mate :)
Lior Cohen