1.0.2 2018-04-05 07:51 UTC

This package is auto-updated.

Last update: 2022-04-27 10:04:43 UTC


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


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);