We make a simple page that has a simple input box where we can enter a Twitter Handle and click
on a Submit button.
Clicking on the submit button should display answers to the following things below it:
a. How many followers does that handle have?
b. How many tweets has that handle done?
c. The latest tweet that has been done by that handle.
Followers 12345
Tweets 645
Latest Tweet “Text of the tweet”
-
Enable read/write access for your twitter app
-
Grab your access tokens from the twitter developer site
-
Include the class in your PHP code that is index.php
require_once('TwitterAPIExchange.php');
Via Composer:
composer require j7mbo/twitter-api-php
I have uploaded it on free host webserver you can see how it works.