ner0tic/php-instagram-api
最新稳定版本:2.0.3
Composer 安装命令:
composer require ner0tic/php-instagram-api
包简介
Instagram API client
关键字:
README 文档
README
ORM agnostic php library to access instagram api
Installation
Add to composer
"require": { "ner0tic/php-api-core": "2.0.0", "ner0tic/php-instagram-api": "*" // ...
Create your config file app/config/instagram.yml
url_client_id: XXXXXXXx url_token: XXXXXXXx http_password: XXXXXXXXXXX
Usage
$ig = new \Instagram\Client(); $photos = $ig->api('User')->recentMedia(); // recentMedia(array $options) foreach($photos as $photo) { echo $photo // $photo->caption.' '.$photo->getLink() }
Api's to choose from:
- user
- relationships
- media
- comments
- likes
- tags
- locations
- geographies
To set the auth settings manually
$ig = new \Instagram\Client(); $ig->setAuthClientId($id); $ig->setAuthHttpPassword($pass); $ig->setAuthUrlToken($token); $ig->setAuthHttpToken($token);
If you have api keys to use, mash them into a pem file and
set the certificate option to the path of the file.
$client->setOption('certificate', $pem_file);
Make a query
$result = $api->get($endpoint, $parameters, $request_options);
ToDo
Laundry List
- DI to access config.yml for variables
统计信息
- 总下载量: 63
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2013-01-02