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.

Requirements

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.

Step 1: Download the source code and install wpForGlass

Download wpForGlass: Go to the wpForGlass github repository, and download a zip of the latest code branch.

Unpack the zip file and upload the wpForGlass folder to your wp-content/plugins folder.

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.

Step 2: Initial Setup of the Mirror API

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.

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: wpForGlass

Product Logo: http://labs.webershandwick.com/img/wpForGlassLogo.png

Homepage URL: http://labs.webershandwick.com/wpForGlass/

Select Web application and specify any value for the hostname, such as localhost

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.

Step 3: Final Setup of 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.

I’m assuming as there are no details on setting up the cron job that one would want to run the /wordpress/wp-content/plugins/wpForGlass/libs/cron/wfgcron.php file as the cron?

ozfarman

Thanks for catching that Paul, we’ll update the instructions here to reflect cron setup. When you install the plugin and successfully get oAuth completed, the settings panel will show you the correct crontab entry entry to make along with the customized path to your installation.

I got the following error when trying to activate it:
Fatal error: Cannot redeclare class Google_Exception in /homepages/44/d154967363/htdocs/app460590446/wp-content/plugins/wpForGlass-master/libs/google-api-php-client/src/Google_Client.php on line 425

Another question. Is there any reason you chose to layout the Title as you did and the permalink? For those of us who are interested our content ranking in search, it would be nice to be able to customize the way the title and permalink will be created.

Thanks so much for this plugin. As I just posted on my blog, It’s a Game Changer!

ozfarman

Thanks Jerad, that’s great to hear. We’ll definitely be adding the ability to customize the title and permalink in the next revision.

Had an issue today where I posted 3 images through wpforglass and they posted a dozen times each to my blog. Many of the posts said Upload Complete! many times in the post. It was a mess to clean up, especially since my blog autoposts to twitter, Facebook and Google+. Any ideas why this happened?

Max

Hello, I followed the procedure but I can’t find the contact. I mean, I can’t share photos with my blog. Is SSL support fundamental for sharing things ? Thank you

Max

Also tries with SSL, but nothing… I can’t see the contact needed for sharing

About wpForGlass

wpForGlass is an open-sourced Wordpress Plugin for Google Glass. It was created by Weber Shandwick's digital innovation team.