Commit 846c397
committed
feature #48084 [Notifier] Add Twitter notifier (nicolas-grekas)
This PR was merged into the 6.3 branch.
Discussion
----------
[Notifier] Add Twitter notifier
| Q | A
| ------------- | ---
| Branch? | 6.3
| Bug fix? | no
| New feature? | yes
| Deprecations? | no
| Tickets | -
| License | MIT
| Doc PR | -
Let's make it easy to tweet from Symfony apps.
```php
$tweet = new ChatMessage('Hello World', (new TwitterOptions())
->attachImage(new File('/path/to/image.jpg'), 'Alt text for the image')
);
$chatter->send($tweet->transport('twitter'));
```
The `TwitterOptions` class supports all options from [`/2/tweets`](https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/post-tweets) and also supports adding alt text to images and subtitles to videos, all this using async uploads.
`TwitterTransport::request()` is also exposed as public API to make authenticated requests to any other API endpoints.
Commits
-------
a9d621cca9 [Notifier] Add Twitter notifierFile tree
3 files changed
+9
-0
lines changed- Exception
- Tests/Exception
3 files changed
+9
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
207 | 211 | | |
208 | 212 | | |
209 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
| 119 | + | |
118 | 120 | | |
119 | 121 | | |
120 | 122 | | |
| |||
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
| 184 | + | |
182 | 185 | | |
183 | 186 | | |
184 | 187 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
0 commit comments