dev-master
9999999-devA package for Twitter search API.
MIT
The Requires
by Phil Bone
search twitter search
A package for Twitter search API.
Switter is a package for Twitter search API., (*2)
Clone repository from GitHub, (*3)
$ git clone https://github.com/philbone/twittersearch.git switter
Inside the directory where Switter is installed, open the terminal and run "composer install" to get the dependencies., (*4)
$ composer install
use Twitter\Search\Search; $apiKey = "jLl8hRLXY3xEPHGnx7UndxrcV"; // replace with your own api key. $apiSecret = "8erBjpOra7GCGkHOK3YbTcqoKTQBSyKgljgG4MCDZi5cKRb7op"; // replace with your own api secret. $search = new Search(); $search->setToken($apiKey, $apiSecret); $value = ["q" => "#PHP #Composer"]; $response = $search->search($value); var_dump($response);
A detailed test example can be found in test/SearchTest.php. Pay special attention to the sample method "testSuccessSearch"., (*5)
Assuming that PHPUnit was installed as a dependency, simply open the terminal from the directory where Switter is installed and run it:, (*6)
$ phpunit
A package for Twitter search API.
MIT
search twitter search