dev-master
9999999-devInstagram SDK
The Requires
- php >=5.3.0
The Development Requires
by Dima U
Instagram SDK
Test task for application on a job, (*1)
You can download SDK via composer
, (*2)
$ composer require diminho/diminho=dev-master
There are several templates of a config file (config_default) in config folder. Rename it to config.[ext]. Only one config file should be active at a time. Config may be of PHP or JSON fomat. Access token can be set via config file or programmatically via SDK\Auth class., (*3)
Autoloading. Import in your script, (*4)
require __DIR__ . './vendor/autoload.php';
Initialization, (*5)
$sdk = new SDK\InstaSDK();
Get a user by ID, (*6)
$response = $sdk->getUserById(1190990766);
$response
it is an object of a Response class, (*7)
USER section: * getUserById($userID); -- GET * getMediaByShortcode($shortcode); --GET * getSearchUserByUsername($$username, [ $params] ); --GET, (*8)
MEDIA Section * getMediaById($mediaId) -- GET * getUserById($userID); -- GET * getMediaByArea($params); -- GET (Here $params must be "lat" and "lng"), (*9)
LIKES Section * postSetLikeMedia($mediaId) -- POST * getLikesByMedia($mediaId); -- GET * delUnsetLikesByMedia($mediaId); -- DELETE, (*10)
Instagram SDK