Skip to content

Commit 47399c8

Browse files
Update README.md v8
1 parent 4ce8806 commit 47399c8

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ PS: v8 now uses the new Twitter API V2. Please read the upgrade guide for your a
3737

3838
This package is part of the [Laravel Notification Channels](http://laravel-notification-channels.com/) project. It provides additional Laravel Notification channels to the ones given by [Laravel](https://laravel.com/docs/master/notifications) itself.
3939

40-
The Twitter channel makes it possible to send out Laravel notifications as a `Twitter status update `(post on the timeline) or as a `direct message`.
40+
The Twitter channel makes it possible to send out Laravel notifications as a `Twitter tweet` (post on the timeline) or as a `direct message`.
4141

4242
## Installation
4343

@@ -51,9 +51,32 @@ composer require laravel-notification-channels/twitter
5151

5252
The service provider gets loaded automatically.
5353

54-
### Setting up the Twitter service
54+
### Twitter App & Credentials
5555

56-
You will need to [create](https://developer.twitter.com/apps/) a Twitter app to use this channel. Within this app, you will find the `keys and access tokens`. Place them inside your `.env` file. To load them, add this to your `config/services.php` file:
56+
You will need to [create](https://developer.twitter.com/apps/) a Twitter app to use this channel. Within this app, you will find the `keys and access tokens`.
57+
58+
Your Twitter app `must be within a project`. Also make sure to activate the `user authentication settings`:
59+
60+
<img width="1289" alt="image" src="https://github.com/laravel-notification-channels/twitter/assets/1394539/0e1eb078-afdb-484e-8c9e-9970a35b4c99">
61+
62+
If done correctly, you should see the right permissions for your access tokens:
63+
64+
<img width="796" alt="image" src="https://github.com/laravel-notification-channels/twitter/assets/1394539/6ee5fc99-0373-4ebb-b8c5-4c84a82632df">
65+
66+
67+
Make sure to copy the right credentials and place them inside your `.env` file.
68+
69+
```env
70+
TWITTER_CONSUMER_KEY=your-consumer-key
71+
TWITTER_CONSUMER_SECRET=your-consumer-secret
72+
TWITTER_ACCESS_TOKEN=your-accesss_token
73+
TWITTER_ACCESS_TOKEN_SECRET=your-access-token-secret
74+
```
75+
76+
<img width="1168" alt="image" src="https://github.com/laravel-notification-channels/twitter/assets/1394539/7e68325d-0255-4f66-a310-86f3277f52a7">
77+
78+
79+
To load them, add this to your `config/services.php` file:
5780

5881
```php
5982
...
@@ -66,8 +89,6 @@ You will need to [create](https://developer.twitter.com/apps/) a Twitter app to
6689
...
6790
```
6891

69-
This will load the Twitter app data from the `.env` file. Make sure to use the same keys you have used like `TWITTER_CONSUMER_KEY`.
70-
7192
## Usage
7293

7394
To use this package, you need to create a notification class, like `NewsWasPublished` from the example below, in your Laravel application. Make sure to check out [Laravel's documentation](https://laravel.com/docs/master/notifications) for this process.

0 commit comments

Comments
 (0)