Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/khanof89/instagram
An easy way to communicate with instagram api
https://github.com/khanof89/instagram
instagram instagram-api instagram-php-sdk laravel-instagram
Last synced: 26 days ago
JSON representation
An easy way to communicate with instagram api
- Host: GitHub
- URL: https://github.com/khanof89/instagram
- Owner: khanof89
- Created: 2017-07-23T19:54:50.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-07-24T16:47:09.000Z (over 7 years ago)
- Last Synced: 2024-05-10T00:26:50.031Z (6 months ago)
- Topics: instagram, instagram-api, instagram-php-sdk, laravel-instagram
- Language: PHP
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Laravel Wrapper for Instagram
===================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.
----------
Installation
-------------composer require shahrukhkhan/instagram
or add the following in your composer.json file require section
"require": {
"shahrukhkhan/instagram": "dev-master"
}Requirements
-------------- Instagram app
- Instagram Client Id
- Instagram Client secret
- Google maps API key from https://developers.google.com/maps/web/Once you have obtained your instagram client id place it in your .env file as:
- INSTAGRAM_CLIENT_ID=
- INSTAGRAM_REDIRECT_URI=
- INSTAGRAM_CLIENT_SECRET=
- GOOGLE_MAPS_KEY=once done that access the function by Instagram::functionName($params);
Functions
---------
To auth with this package use auth() function from your route, you may mention multiple scopes as array```php
Route::get('instagram-auth', function(){
return redirect()->away(\Shahrukh\Instagram\Instagram::auth($scopes));
});
```List of functions available
---------------------------```php
exchangeCodeForToken() // expects the code you received while authenticating, and gives you access token in returngetSelf() // 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.
```