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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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.

The Facebook developers Wiki seems to be very helpful. Looks like XML is returned from  the function with status codes.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.