eniams/linkedin-notifier

Symfony LinkedIn Notifier 桥接器

安装: 39

依赖: 0

建议者: 0

安全性: 0

星标: 4

关注者: 2

分支: 0

开放问题: 3

类型:symfony-bridge

1.1.0 2020-07-27 16:21 UTC

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);
}