Reputation: 80
I have a site written with PHP. I asked if it would be possible to automatically display the latest public post on Instagram on my site? And who will open the site to see the posts? No need to enter the Instagram account
If it is possible, please give me guidance so that I will look for its training
Example :
Upvotes: 1
Views: 2799
Reputation: 1420
You can use this library:
Example call:
Installation:
$ composer require cosenary/instagram
Initialize the class:
use MetzWeb\Instagram\Instagram;
$instagram = new Instagram(array(
'apiKey' => 'YOUR_APP_KEY',
'apiSecret' => 'YOUR_APP_SECRET',
'apiCallback' => 'YOUR_APP_CALLBACK'
));
echo "<a href='{$instagram->getLoginUrl()}'>Login with Instagram</a>";
Data:
$result = $instagram->getUserMedia();
Upvotes: 1