Cannot 'Insert' the Instagram token and ID generated - Forum | JoomShaper
Staff replied SP Page Builder

Cannot 'Insert' the Instagram token and ID generated

Asked by Mr Stuart Forrester 2 years ago Last activity 2 weeks ago

I've created a Facebook app and successfully connected with the app to generate the access token and ID for our Instagram account, BUT...

When the pop-up shows the details with the 'Insert' button at the bottom of the pop-up, clicking 'Insert' does nothing. Closing the window results in none of the details being passed to the settings.

Any thoughts or a place where I can just manually add them e.g. directly into the MySQL DB???

Thanls

10 replies

Manuel Valentin

Hello, I would just like to ask if there are any steps that you followed to create and configure the Facebook App, other than those visible in the video and documentation.
I have tried to follow everything as close as possible, even though there are some differences because the video and documentation are outdated, but I am not able to generate the access token and instagram ID.
When clicking on "Generate token" from Page Builder settings, I get the Facebook error page "Sorry, something went wrong".

Thanks

Mr Stuart Forrester Asked this

Hi Manuel
The first thing I did was make sure we had both a Facebook company page and an Instagram business page.
Once they are in place and connected, you are going to use Facebook LOGIN for Business within the creation of the app.
It is important within the Facebook Login settings to add your domain with the Joomshaper URL https://your-domain.com/administrator/index.php?option=com_sppagebuilder&task=instagram.accessToken
Once the above is done, you should then be able to access the App ID and secret to pass to SP Pagebuilder.
Then Generate the token.
You will then login to Facebook where it will take you through a series of options allowing access to first the Facebook page and then the Instagram page.
That's where I get stuck having got the token data, it does not 'Insert'

Hope that helps?

Manuel Valentin

Thank you a lot Mr. Forrester for the quick reply, that has solved for me several months of not being able to complete this procedure.
The SpPageBuilder documentation is outdated as it says to create a Facebook App of type "None", but which seems to have been removed, so my issue was that I created the app of type Consumer instead of Company/Business.

I would suggest to the support team to update the documentation, as this step is crucial for the success of the procedure.

Thank you again and have a great day

Mr Stuart Forrester Asked this

I've added a SuperUser access if anyone at Joomshaper can help ;)

Manuel Valentin

In my case the green button for inserting the generated tokens into the settings page is working, but if you are having trouble with it, you should be able to insert it into the database in the table "_extensions", you search for the line with type=component and element=com_sppagebuilder, and in the column params of this row you see the parameters where you can insert the various ids.

In specific, in the following part:

{\"appId\":\"000000000\",\"appSecret\":\"00000000000\",\"accessToken\":\"00000000000000\",\"igId\":\"000000000000\"}

Mr Stuart Forrester Asked this

Manual - Thank You :)

ideal-heim-bau

Had the same problem, in case someone else has this problem, this fixed it for me:
Open your Joomla backend
Go to System → Plugins.
Search for System - HTTP Headers.
Open the plugin and locate the Cross-Origin-Opener-Policy setting.
If it is set to same-origin, change the value to same-origin-allow-popups.
Save the settings, then try connecting to Instagram again.

Rashida Rahman Staff

Hi there,

Thank you so much for sharing this. It's very helpful, and we appreciate you taking the time to post it, even on an older thread.

You're right: if Cross-Origin-Opener-Policy is set to same-origin in the System - HTTP Headers plugin, the browser cuts the connection between the Instagram authorization popup and the SP Page Builder settings page. The token gets generated, but clicking Insert does nothing. Changing it to same-origin-allow-popups fixes this.

Since this thread has collected several solutions over time, here's a quick summary for anyone who lands here with the same problem:

  1. Use HTTPS on your live domain. The token generation needs a valid SSL certificate, and it may not work on localhost.
  2. Add the correct redirect URI in your Meta app's Login settings under Valid OAuth Redirect URIs:
    https://your-domain.com/administrator/index.php?option=com_sppagebuilder&task=instagram.accessToken
  3. Check the Cross-Origin-Opener-Policy in System → Plugins → System - HTTP Headers and set it to same-origin-allow-popups if it's currently same-origin. If you use another security extension, .htaccess rules or a CDN like Cloudflare, make sure none of them sends a stricter COOP header.
  4. Clear the Joomla cache and your browser cache, then click Generate Token again in SP Page Builder → Settings → Options.

Full setup guide: https://www.joomshaper.com/documentation/sp-page-builder/addons/media/instagram-gallery-access-token

If anyone still has trouble after trying these steps, please open a new question with your Joomla and SP Page Builder versions, and we'll be happy to help.

Best regards,

Log in to reply.