Download the PHP package chill-pills/laravel-instagram-basic-feed without Composer

On this page you can find all versions of the php package chill-pills/laravel-instagram-basic-feed. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-instagram-basic-feed

Laravel Instagram Basic Feed

Laravel package connecting to Instagram's new API Basic Display. Retrieving personal user's posts and keep them in cache, with specific commands or with Scheduler, and taking charge of refreshing the Instagram token every two months.

Get started

To use the Instagram Basic Display API, you will need to register a Facebook app and configure Instagram Basic Display. Follow the getting started guide.

Requirements

Installation

Install the package in your application by running

Add and complete these lines in your .env file

For the INSTAGRAM_VALID_OAUTH_URI entry, you will use the same URI you used in the Valid OAuth Redirect URIs field when you created the Instagram App. We will retrieve the INSTAGRAM_ACCESS_TOKEN in the next steps. (Ensure all the other env entries are complete)

Set Up

We will need to go over the following steps to ensure our package is configure to work correctly;

Permit your App to access your Instagram account’s profile and media

We need to generate a link which redirects the user to the Instagram “Authorization Window". You can generate the url by running the following command:

Copy & Enter the url in your browser (Your authorization window link should look something like this)

Next, you will be shown the Authorization Window

Image of Yaktocat

Click on Authorize

Retrieve the Authorization code that from the URL

You will be redirected to the INSTAGRAM_VALID_OAUTH_URI. If you look in your browser’s URL bar, you should notice the URL has an authorization code that has been appended to the redirect URL. Something like this:

Copy the authorization code, The authorization code in the redirect URL is everything after code= up to (but not including) the #_ at the end.

Use the authorization code to obtain a short-lived API token & Exchange the short-lived API token for a long-lived API token

Now with the authorization code we are going to generate access token we can use in our application. Use the command below generate the token. We generate long-lived access_token because those are valid for 60 days. Replace the authorization_code with the code from the last step.

Awesome! Now, with this long-lived access_token, you can make requests to the API for the next 60 days. You can also refresh the token, extending for another 60 days as long as the token is not expired and is at least 24 hours old (and has not been revoked by your Instagram user deauthorizing your app).

Usage

There's two commands that lets you fetch your feed or renew the Access Token.

You can add the following scheduler's command to take care of executing those commands automatically

Don't forget to enable the CRON on your machine for Laravel Basic Scheduler in your app/Console/Kernel.php file

To show the Instagram feed on your page, you can just add the following Blade command to include the partial to your page.

You can pass to the @include a hashtag used to search through the posts

If you want to modify the view displaying the instagram posts itself

The MIT License (MIT). Please see License File for more information.


All versions of laravel-instagram-basic-feed with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
illuminate/support Version ^5.8|^6.0|^7.0|^8.0|^9.0
espresso-dev/instagram-basic-display-php Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chill-pills/laravel-instagram-basic-feed contains the following files

Loading the files please wait ....