Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- require_once __DIR__ . '/vendor/autoload.php';
- use phpFCMv1\Client;
- use phpFCMv1\Notification;
- use phpFCMv1\Recipient;
- $client = new Client('service_account.json');
- $recipient = new Recipient();
- $notification = new Notification();
- $recipient -> setSingleRecipient('DEVICE_TOKEN');
- $notification -> setNotification('NOTIFICATION_TITILE', 'NOTIFICATION_BODY');
- $client -> build($recipient, $notification);
- $client -> fire();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement