-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Notifier] Add Twitter notifier #48084
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
184bcc7
to
cb7f52b
Compare
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterOptions.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterOptions.php
Outdated
Show resolved
Hide resolved
cb7f52b
to
43fb5c8
Compare
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterOptions.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this super nice conribution!
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterOptions.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterTransport.php
Outdated
Show resolved
Hide resolved
43fb5c8
to
c412ba6
Compare
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterTransport.php
Outdated
Show resolved
Hide resolved
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterOptions.php
Outdated
Show resolved
Hide resolved
c412ba6
to
5a25215
Compare
Thank you all for the reviews. Comments addressed. |
c026c2a
to
a5d49e3
Compare
src/Symfony/Component/Notifier/Bridge/Twitter/TwitterTransport.php
Outdated
Show resolved
Hide resolved
1d95306
to
58c3fc9
Compare
58c3fc9
to
a9d621c
Compare
There is risk to providing this particular component, because it could lead to people inadvertently violating Twitter's Developer Policy. The policy states:
It will be fine if the developer uses the component to publish tweets using his own app's consumer key, but the moment the developer writes an application where users can provide their own Twitter app credentials, then that developer will be in violation of Twitter's policies. This has been a long-standing policy and a thorn in the side of developers. |
You might want to adapt this component to Twitter API v2, which uses OAuth 2. That means the component config only needs an OAuth access token, and not the Twitter app credentials such as the consumer key. https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/post-tweets |
I don't think we can, because media uploading requires using API v1.1 |
Thank you @nicolas-grekas. |
Let's make it easy to tweet from Symfony apps.
The
TwitterOptions
class supports all options from/2/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.