cable/expo-php-sdk

Expo Notificiton Sender sdk

1.0.3 2018-01-09 21:23 UTC

This package is not auto-updated.

Last update: 2024-11-21 18:44:15 UTC


README

include 'vendor/autoload.php';

// set your users
$users = (new \Cable\Expo\ExpoUserBag())->setUsers(array(
    'YourToken'
));


$expo = new \Cable\Expo\ExpoSdk();
$expo->setUsers($users);

// create your message
$message = \Cable\Expo\ExpoMessage::create('Test Mesaj', 'test icerik')->enableSound();

// send messages
$expo->notify($message, function (\Cable\Expo\ExpoSentMessage $message) {
    var_dump($message->getToken(), $message->isSucceed());
});