bagusrin/twitter

1.0.2 2018-04-05 07:51 UTC

This package is auto-updated.

Last update: 2024-10-27 15:23:27 UTC


README

This is simple PHP Library to use Twitter API.

Cara Install

Library ini dapat diinstall dengan Composer.

composer require bagusrin/twitter:1.*

Jika Anda masih belum memahami bagaimana cara menggunakan Composer, silahkan baca Getting Started with Composer.

Get consumer access key and token from Twitter

Register your application at http://apps.twitter.com/app

Usage

use Abraham\TwitterOAuth\TwitterOAuth;
use Bagusrin\Twitter\Client;

$twitterOAuth = new TwitterOAuth($consumerKey, $consumerSecret);
$client = new Client($twitterOAuth);

// Retrieve the last 50 items in the user's timeline
$tweets = $client->getTimeline(50);