Before creating an application, you have to register your phone number.
- Access https://apps.twitter.com/.
- Click the button Create New App.
- Fill out the form to submit.
Callback URL
is actually a REQUIRED field when you create web-based applications.
Even if you can change it when you provide authentication, you should fill with dummy URL.- e.g. http://127.0.0.1/
To use all endpoints, you have to upgrade privilages of your API key.
- Access https://apps.twitter.com/ to select the application you created.
- Click the tab Permissions.
- Select
Read, Write and Access direct messages
to submit.
- Access https://apps.twitter.com/ to select the application you created.
- Click the tab Keys and Access Tokens.
- Note
Consumer Key
Consumer Secret
. They are for every account that uses your application. - Note
Access Token
Access Token Secret
. They are only for your own account.
- Download and install XAMPP that contains PHP version 7.x.
- Download and install Composer.
- Create your project folder somewhere.
- Right-click in the folder pressing Shift key to click
Open Command Window Here
. - Run the followings commands.
composer require mpyw/cowitter:^1.0
composer install
- Now you can verify some files are created.
- The file
composer.json
contains your package information. - The folder
vendor
contains installed packages.
- Install PHP and Composer using your favorite package manager.
- Run the followings commands.
mkdir ~/myapp && cd ~/myapp
composer require mpyw/cowitter:^1.0
composer install
I believe your skill :D