facebook php notifications_sendEmail

Posted on 2008-11-15
Last Modified: 2012-05-05
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?
Question by:drupal_100
    LVL 6

    Expert Comment

    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?


    Author Comment

    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.

    LVL 6

    Accepted Solution

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

    Featured Post

    Highfive Gives IT Their Time Back

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Both Easy and Powerful How easy is PHP? (  Very easy.  It has been described as "a programming language even my grandmother can use." How powerful is PHP?  http://en.wikiped…
    Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now