facebook php notifications_sendEmail

I tried to send FB email with the following function, but did not work.

$fb = new Facebook(API_KEY, SECRET_KEY);

$subject = "FB Email";
$message_body = "This is a FB email testing.";
$fb->api_client->notifications_sendEmail($user, $subject, $message_body);

Could you give a working example?
Who is Participating?
dwaynecharringtonConnect With a Mentor Commented:
The Facebook developers Wiki seems to be very helpful. Looks like XML is returned from  the function with status codes.

The example that you have shown should actually work. You're using the proper syntax and initiating the Facebook API correctly.

Have you checked to ensure that your server is correctly configured?

drupal_100Author Commented:
server seems OK.

I can user notification_send(..) to successfully send notification to user, and the message shows up
in user's notification area.

But notification_sendEmail(...) does not put anything on user inbox area.

Should the mail go to user inbox area?

Also is there some way to find out the FB function run well or not.

For example,
$result = $fb->api_client->notifications_sendEmail($user, $subject, $message_body);
then we can get something from $result to know about the function running well or not.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.