FacebookRestClient::notifications_send PHP Method

notifications_send() public method

Sends an email notification to the specified user.
public notifications_send ( $to_ids, $markup, $no_email ) : string
return string url which you should send the logged in user to to finalize the message.
    public function notifications_send($to_ids, $markup, $no_email)
    {
        return $this->call_method('facebook.notifications.send', array('to_ids' => $to_ids, 'markup' => $markup, 'no_email' => $no_email));
    }

Usage Example

 public function &notifications_send_vo($to_ids, $notification, $type, $campaign_name, $from_id = null, $msg_data_array = null, $page_data_array = null)
 {
     $msg_info_array = $this->m_an->m_ab_testing_mgr->get_selected_msg_info($campaign_name, $msg_data_array);
     $page_info = $this->m_an->m_ab_testing_mgr->get_selected_page_info($campaign_name, $page_data_array);
     $msg_id = $msg_info_array[0];
     $msg_text = $msg_info_array[2];
     $st1 = $this->m_an->format_kt_st1($campaign_name);
     $st2 = $this->m_an->format_kt_st2($msg_id);
     $st3 = $this->m_an->format_kt_st3($page_info[0]);
     $uuid = $this->m_an->gen_notifications_link_vo($notification, $msg_text, $st1, $st2, $st3);
     $r = parent::notifications_send($to_ids, $notification, $type);
     if (!empty($r)) {
         if ($type == 'app_to_user') {
             $this->m_an->kt_annoucements_send($to_ids, $uuid, null, $st1, $st2, $st3);
         } else {
             if ($type == 'user_to_user') {
                 if ($from_id) {
                     $from = $from_id;
                 } else {
                     $from = $this->m_an->get_fb_param('user');
                 }
                 $this->m_an->kt_notifications_send($from, $to_ids, $uuid, null, $st1, $st2, $st3);
             }
         }
     }
     return $r;
 }