{--access_token= : Instagram access token}
{--profile_id= : Instagram profile ID}
{--api_version= : Instagram API version (default from config)}'
use NotificationChannels\Instagram\InstagramChannel;
use NotificationChannels\Instagram\InstagramMessage;
use Illuminate\Notifications\Notification;
class ChannelConnected extends Notification
{
public function via($notifiable)
{
return [InstagramChannel::class];
}
public function toInstagram($notifiable)
{
return InstagramMessage::create()
->to($notifiable->instagram_id) // Optional
->text('Congratulations, the communication channel is connected');
}
}
return InstagramMessage::create('You have just paid your monthly fee! Thanks');
return InstagramMessage::create()
->to($notifiable->instagram_id)
->text('How can we help?')
->buttons([
Button::create('View Website', $url)->isTypeWebUrl(),
Button::create('Start Chatting', ['user' => $this->user->id])->isTypePostback() // Custom payload sent back to your server
]);
/**
* Route notifications for the Instagram channel.
*
* @return int
*/
public function routeNotificationForInstagram()
{
return $this->instagram_id;
}
bash
php artisan instagram:set-start-buttons
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.