PHP
Ver Más instrucciones
1
abrir un Bloc de notas y escriba el siguiente código : < * Aplicación php /PHP Facebook notificación * /? . > Guarde el código como massmessage.php
2
Definir la clase de notificación de la siguiente manera : Notificación clase { Private $ facebook , Private $ fbconfig = array (' api_key = > '',' secret_key '= >'' ) ;} el código anterior también define las opciones de configuración de Facebook
3
Especifique las variables a través de código: . Private $ MailMessage =''; Private $ mailsubject ='' , Private $ notificación ='';
4
Inicializar las variables en la función "init ": $ this -> MailMessage = "HTML Message" , $ this-> mailsubject = "Email" ; $ this -> notificación = " Check it out" ;
5
Construir el archivo facebook.php : Incluir " facebook.php " $ this-> facebook = new Facebook ( $ this - > fbconfig [' api_key '] , $ this -> fbconfig [' secret_key '] $ this -> init ();
6
Enviar notificación a través de la siguiente función: $ this -> ; facebook- > api_client -> notifications_send ($ ids, $ this -> notificationMessage , $ this -> NotificationType ) ;
7
Enviar notificaciones de masas : $ notifObj = new Notificación () ; $ notifObj -> SendNotification ( '137373777 , 39344939 ' ) . . 137373777 es uno de los user_id Usted puede agregar, a lo sumo, 100 usuarios al mismo tiempo en la función " SendNotification "