[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1839
  • Last Modified:

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?
0
drupal_100
Asked:
drupal_100
  • 2
1 Solution
 
dwaynecharringtonCommented:
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?


0
 
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.




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

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

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now