Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jyane/simpletwitterapi
Simple PHP library for Twitter REST API
https://github.com/jyane/simpletwitterapi
Last synced: 23 days ago
JSON representation
Simple PHP library for Twitter REST API
- Host: GitHub
- URL: https://github.com/jyane/simpletwitterapi
- Owner: jyane
- License: mit
- Created: 2014-10-10T11:34:22.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-12T16:39:00.000Z (about 10 years ago)
- Last Synced: 2023-08-10T19:39:40.222Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 117 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Introduction
多くのレンタルサーバーで動く, Twitter REST API を叩くシンプルなPHPライブラリです.
一部のレンタルサーバーでは`allow_url_fopen`が`Off`になっているので作成しました.
`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:
```php
$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.