Integrate Instagram Without API + Drupal 8

#InstagramWithoutAPI

It is a very simple module that interacts with Instagram without an API and creates a block containing your latest messages from Instagram.

To send bug reports and design feedback or to track changes: https:/www.drupal.org/project/issues/instagram without api Go to Block Design to attach Instagram Block to specific content region.
I.e Home-> Admin-> Structure-> Block.

You must also add the Instagram account user name as part of the block setup to pull posts.

MODULE URL: https://www.drupal.org/project/instagram_without_api

 

Steps to Instagram Authentication Code Generation

1-Instagram Registry Application: Visit https:/www.instagram.com / developer to register a new app.

2–Register New Client App: Go to Manage Clients and press' Register New Client' to register and access API

3–Copy & Save Client ID: You'll just need the User ID to copy the Client ID.

4–Configure Public Access Client: Click the' Edit' button on your app from the Manage Clients section, then open the' Safety' tab and uncheck the' Disable Implicit OAuth ' button as we'd like to see our public feed. In addition, open the' Sandbox' tab and confirm the' admin' of this app.

5-Use this browser-based API URL: You can use the simple URL of your browser to grab your access token. Open your browser and paste the URL below, delete the string after' user I d' and before the User ID you saved previously, and click Enter to access this URL: https:/api.instagram.com/oauth/authorize?Client id=7ffab69n40ec4f829b81ad0e98701528&redirect uri= https:/www.domainname.com&response_type=code&scope=public_content

6-Get Code: You get the code now. Just save the file for future use.
  www.domainname.com/?Code= e568703545nd7878bphe398d1f4ak48bd

7–Authorize it: a' Authorize ' screen will be generated by visiting the URL we made with the client ID. At this point, you are simulating an API connection using your local server and you will authorize it to display the reaction to the Access Token. Tap on the "Enable" button at https:/api.instagram.com/oauth/authorize/?Client id=7ffab69n40ec4f829b81ad0e98701528&redirect uri= https:/www.domainname.com&response_type=token

8 - Get Access token: data in the URL... you can catch your public access token right after' #access token=' which also has your ID in it.
  https:/www.domainname.com/#access token=75XXXXXXXXX51.76fad699.21a171c8md89f26eaf35ef94bfa5a360 User ID is the first digit string before user I d: 75XXXXXXXX51 Accesstoken=75XXXXXXXXXXX51.76fad699.21a171c8md89f26eaf35ef94bfa5a360

 

Solution:

-> The Instagram control key, from my experience, expires at random moments. While our access tokens do not signify an expiry date, the app will handle the event that either the user revokes access, or after a certain period of time, Instagram removes the token. If the token is no longer valid, the API answers will include "error type= OAuthAccessTokenError."

-> We need to restore the Authentication key, approve the Instagram account and put it on our live server at any time. We don't understand that the time interval for the Instagram access token expires.

-> We can get the data via query I d &?A=1 method (returns data-first set-in JSON format for the user account ' https:/www.instagram.com/{user}/?a=1'). I have stated that the question I d is a constant value. Which means being 17888483320059182 at all times. Question I d' is now set, just use it (unless Instagram changes it, at least).

-> Take Instagram media request InstagramWithoutAPI: Unless Instagram has changed the way this information is provided, none of the above strategies would function. So, I wanted to get Photo details from the https:/www.instagram.com/{user}/route for Instagram. This technique returns all photos relevant to user account.

-> So without an API, we are getting the information from instagram.  (https://www.drupal.org/project/instagram_without_api)

 

Tags

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
3 + 0 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.