Package Data | |
---|---|
Maintainer Username: | khanof89 |
Maintainer Contact: | shahrukh@iamshahrukh.com (Shahrukh Khan) |
Package Create Date: | 2017-07-23 |
Package Last Update: | 2017-07-24 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-15 15:03:21 |
Package Statistics | |
---|---|
Total Downloads: | 47 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This is a simple package to provide you all the instagram API accessible at one place. While writing this package I had php7.0 installed but can work with php5.6 as well just change the guzzle version.
composer require shahrukhkhan/instagram
or add the following in your composer.json file require section
"require": {
"shahrukhkhan/instagram": "dev-master"
}
Once you have obtained your instagram client id place it in your .env file as:
once done that access the function by Instagram::functionName($params);
To auth with this package use auth() function from your route, you may mention multiple scopes as array
Route::get('instagram-auth', function(){
return redirect()->away(\Shahrukh\Instagram\Instagram::auth($scopes));
});
exchangeCodeForToken() // expects the code you received while authenticating, and gives you access token in return
getSelf() // gives information about logged in user
getSelfMedia() // gives media list of logged in user
getFollowedBy() // expects access token and user id(default is self), return the list of users who follows the user in question
getFollows() // expects access token and user id(default is self), return the list of users, user in question follows
getFollowRequest() // expects access token and user id (default is self), return the follow requests user in quesiton received
getRelationship() // expects access token and user id, get information about a relationship of logged in user with mentioned user id
changeRelationship() //expects access token and user id, modify the relationship between the current user and the target user.
getMedia() // expects access token and media id, get information about a media object.
searchMedia() //expects access token, area and distance (default distance is 1000 mtrs), searches for recent media in a given area.