PHP code example of cable / expo-php-sdk
1. Go to this page and download the library: Download cable/expo-php-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cable / expo-php-sdk example snippets
// 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());
});