Take a look at the sticky post at the top of the forum, which talks about a workaround. That should set you up. You can use the same generated token on both sites, BTW.
Thanks for your rapid response.
I have followed the instructions and used the OAuth 2.0 Playground and successfully created a refresh token as suggested.
I have plugged this in to the Google settings for Photonic as suggested and it correctly displayed an authorisation screen for my account. That’s great progress.
I am still having a problem however and when I try to use a command such as "[gallery type='google' view ='photos' album_id='2019-04-11 Arundel Tulip Festival with Ellie']" I get the response: `”Failed to get data. Error:
Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.”`
Any help would be gratefully accepted !
I get the response: `”Failed to get data. Error:
Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.”`
When you get that error, it is generally indicative of one of 3 things:
- Your hosting provider blocking SSL requests
- Your site’s security settings stripping out some parts of a URL or blocking SSL requests (typically in
.htaccess or in your Apache configuration file)
- A security plugin in your WP installation blocking some API calls
Unfortunately such cases are too few and far in between for me to have any more concrete methods to resolve, so this is one of those errors that largely requires trial and error to fix.
That being said, the album ID you have is incorrect – the correct album ID should show up either when you you are building the gallery using the “Add / Edit Photonic Gallery” button, or via Photonic → Helpers → Google Photos
Once again, thank you for the response.
I must confess that I’m not sure where to go from here.
- I am my own hosting provider and have done nothing to block SSL requests.
- I’ve check .htaccess and the apache configuration file, but cannot see anything that would strip out the URL or block SSL requests
- I don’t have any security plug-ins installed in WP as my site is housed within my LAN at home and not visible from outside (though it can obviously see outside).
I’ll have to play around some more but seem to have hit a wall at present.
OK – try turning off SSL verification (Photonic → Settings → Generic Options → Advanced → Turn off SSL verification in calls). I can’t think of anything else that would interfere with requests.
Sayontan,
Thank you once again. Turning off SSL has made a significant difference (as did switching back from Gutenberg to the classic editor).
Now I get the button to select my gallery and (after repeating the advice you gave regarding the pinned post) I get the photo/album selection open. I can then point to the album in question and select the layout. This is real tangible progress.
The outstanding problem that I seem to have is that the blog post doesn’t display anything other than the post title. No content at all… even preliminary text that I had entered.
Ah ha… responding to my own comment, this seems to be a little random. I tried a different album with a different grid (2 x 2) and this time it worked. I will experiment some more.
Since you aren’t able to see the text, one thing you might want to check is if you are getting any fatal errors as a part of your theme. You can do so by going to “View Source” for your page. Properly formed markup should have a closing </body> and </html> tags. Fatal errors due to something in your theme will prevent subsequent markup from rendering.
Thank you. I have no doubt that this was my error. It all seems to be working now. I will do some final testing tomorrow (to ensure that the refresh token works ok and everything still displays and works). On the assumption that it does, then I will re-implement the code in my production version of the blog.
I think that we can mark this as closed. The initial problems that I reported are solved by the suggestions you have made. I can successfully display albums in my private blog (I don’t seem to be able to display multiple photos as I get an error code 411 – but I can live with that as it is albums that I wanted).
Thank you so much for your support