Aprire un blocco note e inserire il seguente codice:   Definire la classe di notifica come segue : classe di notifica { private $ facebook ; private $ fbconfig = array (' api_key = > '',' SECRET_KEY '= > '') ; } Questo codice di cui sopra definisce anche le impostazioni di configurazione di Facebook   Specificare variabili tramite codice : . privata $ MailMessage =''; private $ mailsubject = '' ; private $ notifica ='';   inizializzare le variabili in funzione " init " : $ this-> MailMessage = " HTML Message " ; $ this-> mailsubject = " E-mail " ; $ this-> notifica = " check it out " ;   Costruire il file facebook.php : Include " facebook.php " ; $ this-> facebook = new Facebook ( $ this- > fbconfig [' api_key '] , $ this-> fbconfig [' SECRET_KEY '] $ this - > init ();   Invia notifica tramite la seguente funzione : $ this-> , facebook - > api_client - > notifications_send ( $ ids , $ this-> notificationMessage , $ this-> NotificationType ) ;   Invia notifiche di massa : $ notifObj = nuova notifica ( ) , $ notifObj - > sendNotification ( '137373777 , 39.344.939 '); . . 137.373.777 è uno dei user_id è possibile aggiungere al massimo 100 utenti in una sola volta nella funzione " SendNotification " 
 2 
 3 
 4 
 5 
 6 
 7 
 
              Informazioni correlate
                  
Programmazione © www.354353.com