Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Sharim's avatar

Show Instagram Feed in Laravel

I'm using composer require dymantic/laravel-instagram-feed this package to show instagram feed in my website. I've followed the instructions from a popular video on yoututbe:

https://www.youtube.com/watch?v=7SQpanLEhFU

I've generated a callback uri from terminal and accessed through the browser. I clicked the allow access to my instagram. It authorized and redirect back to my website. But when it came back, an access token should generate automatically and store it in my database that will allow my project to access the account. That token is not generating.

I generated token from facebook developers and inserted into my database manually. Now I'm getting this error:

Unresolvable dependency resolving [Parameter #0 [ $config ]] in class Dymantic\InstagramFeed\Instagram

Or is there any other step by step guide to show instagram feed in the website.

0 likes
4 replies
Farirai's avatar

could you show the code which is throwing the error

Sharim's avatar

@Farirai Offcourse. I've put some code in Controller like this:

use Dymantic\InstagramFeed\Profile;
public function index() {
        $data = [
            'instagram_feed' =>  Profile::where('username', 'myusername')->first()->feed(2),
        ];
        return view('welcome', compact('data'));
    }

and in app\Console\kernal.php

use Dymantic\InstagramFeed\Profile;
protected function schedule(Schedule $schedule)
    {
        $schedule->call(function() {
            Profile::where('username', 'myusername')->first()->refreshFeed(12);
        })->twiceDaily();
    }
Matthew65's avatar

We will follow the below step to feed the Instagram Data. Steps to integrate instagram with laravel. ... Step-1 Install Laravel Application. ... Step-2 Install Instagram Package. ... Step-3 Create the controller. ... Step:4 Create the route. ... Step:5 Create the blade file. ... Step-6 Write the instagram logic in controller.

Thanks

Sharim's avatar

@Matthew65 All the steps are done. from developers.facebook.com, I created a testing app and connected it with my instagram account. They provide me instagram app id and instagram secret. I put both in config/instagram-feed.php. They ask me about the website url and auth back url. I've put both of them. But still instagram is not showing on the page.

Please or to participate in this conversation.