eniams / linkedin-notifier
Symfony LinkedIn Notifier 桥接器
1.1.0
2020-07-27 16:21 UTC
Requires
- php: ^7.2.5
- symfony/http-client: ^4.3|^5.0
- symfony/notifier: ^5.0|^5.1
This package is auto-updated.
Last update: 2024-09-21 17:16:31 UTC
README
为 Symfony Notifier 提供LinkedIn 集成。
安装
$ composer require eniams/linkedin-notifier
启用包
在 bundles.php
中添加 Eniams\Notifier\LinkedIn\LinkedInNotifierBundle::class => ['all' => true],
启用 LinkedIn 传输
在 config/packages/notifier.yaml
中添加 linkedin
chatter
framework: notifier: chatter_transports: linkedin: '%env(LINKEDIN_DSN)%'
定义带有您凭证的 DSN。
您可以看到如何从 LinkedIn 获取凭证 LINKEDIN_DSN='linkedin://token:user-id@default'
使用它!
示例假设您已启用自动装配
<?php use Symfony\Component\Notifier\Notification\Notification; use Symfony\Component\Notifier\NotifierInterface; public function message(NotifierInterface $notifier) { $notification = new Notification('Hello World', ['chat/linkedin']); $notifier->send($notification); }