Google Glass is one of the trendiest technologies out there right now, but it’s hard to tell who it’s actually useful for. One group that stands out is publishers and journalists who can use Glass to chronicle their stories through rich, on-the-fly media experiences. And as the world’s largest publishing platform, it was only a matter of time before WordPress and Google Glass hooked up. Now, thanks to Weber Shandwick, that time has come. wpForGlass is the first plugin that allows you to post to your WordPress blog from Google Glass.
The workflow for wpForGlass is fairly simple and it’s use case is pretty clear. The plugin uses the Mirror API from Google to allow users to post photos and videos taken with Google Glass and post them on your WordPress blog, using voice recognition to add a caption.
Installing wpForGlass is much like installing any other WordPress plugin. The one difference is that first you will need to create a Google API-console project and get your Google client API keys. Once you have those, you’ll upload wpForGlass, get it setup, and verify that everything has been installed correctly.
Here’s the base minimum you’ll need to install wpForGlass:
- A valid SSL certificate signed by a trusted certificate authority – without this, you won’t be able to receive timeline notifications from the Mirror API.
- Access to the cron on your server, or the ability to setup cron jobs via an admin panel
- A working WordPress 3.6+ installation
- PHP 5.3+
wpForGlass is beta and hasn’t been tested with all server-setups or WordPress installations. wpForGlass uses the shortcode to display videos in your theme. WordPress 3.6 introduced the shortcode as standard.
If you’re running an older version, you’ll have to hack the file
libs/oauth/notify.php at around lines 177-189 to insert video content into a format your theme will understand.
- Download wpForGlass: download a zip of the latest code branch.
- Unpack the zip file and upload the wpForGlass folder to your
- Once you activate the plugin, you’ll be able to find the admin menu under settings:
- Go to the admin page, and if you have admin permissions, you should see the following:
Take note of the URI’s. You’ll need them in the next step.
Note: We’ve used images and some basic instructions from the awesome Google Mirror API PHP quickstart instructions but for clarity, our instructions are customized with a a slightly different process specifically for wpForGlass.
- Go to the Google APIs console and create a new API project.
- Click Services and enable the Google Mirror API for your new project.
- Click API Access and create an OAuth 2.0 client ID for a web application.
- Specify the product name and icon for your Glassware. These fields appear on the OAuth grant screen. To make it easier for you, here are the fields you can copy and paste in (or use your own!):
- Product Name:
- Product Logo:
- Homepage URL:
- Product Name:
- Select Web application and specify any value for the hostname, such as
- Click Edit settings… for the client ID to specify redirect URIs. The URI’s you will enter are the ones that were given to you in the wpForGlass settings panel:
- Make note of the client ID and secret from the Google APIs Console. You’ll need them, along with the simple api key to finish setting up wpForGlass.
- Now that you have the mirror api setup, enter your Client ID, Client Secret, and Simple Key in the fields below.
Also type in the name that will appear on your contact card for wpForGlass, and press the button to verify your API settings with Google.
- Assuming that everything worked correctly, all you need to do is setup your crontab entry. The admin screen will have the crontab line for you to enter, be sure to put the full path to curl as part of crontab entry.
- Go to your Google Glass page, and you should see the following:
- Check your webserver error logs for messages from the cron script:
- Turn on your Glass, take a photo, and share it with your blog!