With effect from version 1.68 of Photonic, Picasa and Google Photos have two different types of shortcodes. The Google Photos module was not available prior to release 1.68 of the plugin. The split has been done to handle the new API Google has previewed for Google Photos in May 2018. Both modules display photos from the same source, but have different strengths and weaknesses. Please see the Picasa page as well.
Using Photonic with simple parameters the gallery short-code can now be used to display albums and photos from Picasa:
The main switch for Picasa is the
type parameter. You also need to have a
view specified as well:
[gallery type='google' view='abc']
You can also control various skinning aspects of how the thumbnails are displayed.
Google Photos vs. PicasaWeb (🔗)
In its infinite wisdom Google announced the shutdown of its Picasa service in February 2016 in favour of Google Photos. However, until May 2018 the old Picasa API remained the only way to programmatically retrieve photos from Google Photos. As a result Photonic was compelled to use Picasa’s API. Then, in May 2018 Google announced the Google Photos API in “developer preview“, encouraging users to test it, but discouraging use of the same for production instances. The developer preview, while functional, has restrictions in terms of how many requests can be made per day (2500).
In the opinion of many, Google Photos in itself is a giant leap backwards:
- PicasaWeb had an easy way of telling you what the album ID was. When Google killed PicasaWeb, this was gone. I have gotten around this by providing a “Helper” for finding the IDs. You can go to Photonic → Helpers → Picasa, put in your user name, and get the IDs. Note that the same album has different IDs between PicasaWeb and Google Photos! Also note that with effect from version 2.00 you will not require the “Helpers” if you use the “Add / Edit Photonic Gallery” button to insert your gallery.
- PicasaWeb used to support a mode for “Limited” sharing. As long as it was still around, in PicasaWeb restricted albums created in Google Photos showed up as “Limited”, while the classical PicasaWeb option of “Limited, anyone with the link” also existed for the same album. This permitted you to use the
authkeyprovided by PicasaWeb. But now that PicasaWeb is fully gone, this option doesn’t exist. Google introduces something similar at first glance, wherein it generates a shortcode for an album that you can hand out. E.g. for one of my albums it gives me the link https://goo.gl/photos/TuWyKAdameiXTmdo6. Clicking on the link expands it out, but none of the details in the link help in the API. Moreover the shortcode cannot be expanded by the API without authentication! Try this link. For older albums created with PicasaWeb, the
authkeystill works, as shown on the Albums page.
- In perhaps the least thought out move, Google made it very, very hard to make an album public. In fact, there is no way currently to determine a user’s public albums in Google Photos – you only see the older PicasaWeb albums. There were certain third-party workarounds that let you make albums public, but those do not work any more either.
Which Module to Pick?(🔗)
For most purposes the Picasa module of Photonic does the job perfectly, though the code complexities require jumping through hoops in terms of the shortcode. But there are certain areas where Google Photos do better. You can use the following table for reference:
|Use Photonic’s Picasa Module if…||Use Photonic’s Google Photos Module if…|
Both the modules can coexist. As you can see in the demo pages I have got both Picasa and Google running. So you can start using Google Photos and transition slowly from Picasa without breaking anything on your site.
Note that the album ids are different between PicasaWeb and Google Photos for the same album. The shortcode structure is slightly different as well, so you cannot simply swap out
type='google' and expect it to work.
Also note that while Google hasn’t officially announced the date for phasing out the Picasa API, it will be phased out once the Google Photos API is more stable.
Obtaining a Client ID (🔗)
An API key is mandatory for using Google Photos.
You can obtain an API Key using the instructions on the Picasa page. In fact, if you have already obtained this for Picasa, you can reuse it provided the following steps are performed.
Once you have obtained the API key you have to follow these steps to make sure that you are able to use it with Google Photos.
- First, make sure that the “Redirect URIs” listed under Photonic → Settings → Google Photos → Google Photos Settings → Google Client ID are present in your API Key settings in Google’s API Console. Instructions are on the Picasa page.
- Navigate to the Dashboard of your API Manager and select your API project as per the instructions on the Picasa page. If you don’t have a project, the instructions are again on the Picasa page. You should see something like this:
- Do you see “Photos Library API” listed in the lower section above? If not, click on the link up top that says “+ ENABLE APIS AND SERVICES”. You should see something like this come up:
- In the search box above type in “photos”. The “Photos Library API” will now show up. Click on it:
- You will be taken to a page with details about the API. Click on the link to enable it:
- The API will be added and you will be taken to a page with statistics for it. You can go back to the “Dashboard” now:
- Your dashboard will show the new API now available. Your Client ID is ready for use!
Unlike Picasa, Google Photos only supports back-end authentication. To set it up you will need to do the following:
- The first step requires you to set the Google Client ID and Google Client Secret at Photonic → Settings → Google Photos → Google Photos Settings. Note that if you have already obtained a Client ID for Picasa previously, you can reuse that, but you have to perform the steps documented in the previous section.
- Next, head over to Photonic → Authentication → Google Photos, then start the authentication:
- You will be taken to a screen on Google that will ask you to authorize an account. Pick the account associated with your photos:
- You will be shown what permissions are requested by your API key. Note that for Picasa authentication only the first one is shown. Google Photos requires the two additional ones. You can allow access to the apps:
- You will be taken back to Photonic’s Authentication screen, where you can now obtain the “Refresh Token”:
- Clicking on “Obtain Token” will show you the token, which you can now “Save”:
With that your authentication is complete. Your setup is now good for use!