2017 © Pedro Peláez
 

library twittersearch

Application Authentication Only - Search Twitter API

image

asabanovic/twittersearch

Application Authentication Only - Search Twitter API

  • Wednesday, March 22, 2017
  • by asabanovic
  • Repository
  • 0 Watchers
  • 0 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Twitter Search

Application Authentication Only - Search Twitter API, (*1)

Installation

Pull the project using composer:, (*2)

composer require asabanovic/twittersearch

Usage

Twitter Search is a light version, with app-only authentication (all that is required is an app key and app secret), used to search tweets by its queries defined in the official Twitter documentation (https://dev.twitter.com/rest/public/search)., (*3)

Note: Make sure you wrap calls in try/catch block as it will throw exceptions., (*4)

Example

require ('vendor/autoload.php');
use TwitterSearch\Twitter;

try {
    $app_key = 'xxxxxxxxxxxxxxxxxxx';
    $app_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
    $client = new \GuzzleHttp\Client();

    $twitter = new Twitter($client, $app_key, $app_secret);
    $twitter->searchTweets('#Berlin filter:safe', 5);

    $status_code = $twitter->getStatusCode(); // Example: 200 OK
    $tweets = $twitter->getResponse(); // Array of objects
} catch (\Exception $e) {

}

The Versions

22/03 2017

dev-master

9999999-dev

Application Authentication Only - Search Twitter API

  Sources   Download

MIT

The Development Requires

by Adnan Sabanovic

22/03 2017

v1.0.1

1.0.1.0

Application Authentication Only - Search Twitter API

  Sources   Download

MIT

The Development Requires

by Adnan Sabanovic

21/03 2017

v1.0.0

1.0.0.0

Application Authentication Only - Search Twitter API

  Sources   Download

MIT

The Development Requires

by Adnan Sabanovic

20/03 2017

v1.0

1.0.0.0

Application Authentication Only - Search Twitter API

  Sources   Download

MIT

The Requires

 

by Adnan Sabanovic