Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alterebro/instagram-feed
Get the latest pictures from an Instagram user or hashtag without OAuth credentials or access token. This is not using the Instagram API platform or Graph API so it doesn't need you to authenticate, authorise or register your application anywhere.
https://github.com/alterebro/instagram-feed
api instagram instagram-feed instagram-scraper
Last synced: 1 day ago
JSON representation
Get the latest pictures from an Instagram user or hashtag without OAuth credentials or access token. This is not using the Instagram API platform or Graph API so it doesn't need you to authenticate, authorise or register your application anywhere.
- Host: GitHub
- URL: https://github.com/alterebro/instagram-feed
- Owner: alterebro
- License: mit
- Created: 2019-07-29T22:14:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-11-22T20:55:17.000Z (almost 4 years ago)
- Last Synced: 2024-05-21T05:16:49.387Z (6 months ago)
- Topics: api, instagram, instagram-feed, instagram-scraper
- Language: PHP
- Homepage: https://packagist.org/packages/alterebro/instagram-feed
- Size: 137 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# instagram-feed
> Get the latest pictures from an Instagram user or hashtag without OAuth credentials or access token. This is not using the Instagram API platform or Graph API so it doesn't need you to authenticate, authorise or register your application anywhere.
## Installation
composer require alterebro/instagram-feed
### How to use it
```php
require __DIR__ . '/vendor/autoload.php';use Alterebro\InstagramFeed;
$feed = new InstagramFeed(
$query, // i.e: "@alterebro"
$cachePath // i.e: __DIR__ . "/tmp/"
);
$feed->JSON();
```#### Parameters
— **Mandatory** :
- `$query` : String starting with '@' to retrieve an username or without it to get a hashtag
- `$cachePath` : Folder where to store the data. i.e: `/tmp/` ( `chmod 777 /tmp` )— **Optional**
- `$feedItems` : Items to retrieve. Defaults to 6 items.
- `$cacheTime` : How long does the cache lasts. Defaults to 86400 seconds (_1 day_).
- `$cacheForce` : Force to cache the data. Defaults to `false`.```php
// Retrive 10 items from user @alterebro and stores it on the /tmp/ folder for 12 hours / half day (43200 seconds)
$feed = new InstagramFeed('@alterebro', '/tmp/', 10, 43200);// Get the data :
$data = $feed->load();// or Output as JSON :
$feed->JSON();
```