Skip to content

jyane/SimpleTwitterAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

多くのレンタルサーバーで動く, Twitter REST API を叩くシンプルなPHPライブラリです. 一部のレンタルサーバーではallow_url_fopenOffになっているので作成しました. file_get_contents()の代わりにcurl_exec()によって接続を行います.

This is a simple PHP library for Twitter REST API. Some rental servers do not allow allow_url_fopen. Because, this library uses curl_exec() instead of file_get_contents().

Usage

config.phpに適当な値を設定し,下記のように呼び出します.

Update config.php, and write like that:

$twitterAPI = new TwitterAPI();
$twitterAPI->request(
  'GET',                                                     // method
  'https://api.twitter.com/1.1/statuses/user_timeline.json', // url
  array(                                                     // parameters
    'screen_name' => '@_jyane',
    'count' => 10
  )
);

See also https://dev.twitter.com/rest/public.

About

Simple PHP library for Twitter REST API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages