- register on developer.twitter.com
- on your developer dashboard you should see a
Default project
with aProject app
Customize the app. From Settings
, run User authentication settings
Set:
App permissions
➡Read and write
Type of App
➡Web app (Confidential client)
Callback URI
➡https://example.com
(literally)
Save, go back to the app and switch to Keys and tokens
.
Check the Access Token and Secret
: it must read
Created with Read and Write permissions
Now copy the variables to your local .env
file and set the values from the Twitter app.
You can now post a message on the page with
$messenger->sendMessage($messageText)`