Introducing WPGPlus: Posting from WordPress to Google+

google__icon

Inspired by seeing comments in Google+ about the need for a WordPress cross-post, I whipped up a quick WordPress plugin: WPGPLus.

For now, since the Google+ API is read-only, I’m borrowing inspiration from Luka Puši?’s GPlus Bot and Dmitry Sandalov’s Twitter 2 Google Plus script.

This means emulating the Google+ mobile web experience using Curl.

WPGPlus adds a box to the post edit screen where you can choose yes/no for publishing to Google+, as well as a place for a message to be used in the body.

(If you provide a Google+ message it is used; if you provide a post excerpt it is used; otherwise post content is used).

Anyway, check it out and let me know what you think!

Did you like this? Share it:

14 responses

  1. Uh oh. I have an error. I test the plugin by publishing a new post and filling in the box there, and get:

    Warning: fwrite(): supplied argument is not a valid stream resource in /home/content/57/7282057/html/wp-content/plugins/wpgplus/gplus.php on line 55

    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ‘;’ in Entity, line: 60 in /home/content/57/7282057/html/wp-content/plugins/wpgplus/gplus.php on line 72

    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ‘;’ in Entity, line: 60 in /home/content/57/7282057/html/wp-content/plugins/wpgplus/gplus.php on line 72

    Warning: DOMDocument::loadHTML() [domdocument.loadhtml]: htmlParseEntityRef: expecting ‘;’ in Entity, line: 60 in /home/content/57/7282057/html/wp-content/plugins/wpgplus/gplus.php on line 72

    Warning: Cannot modify header information – headers already sent by (output started at /home/content/57/7282057/html/wp-content/plugins/wpgplus/gplus.php:55) in /home/content/57/7282057/html/wp-includes/pluggable.php on line 866

  2. I got the same errror warning.
    After I installed the developer version of WPGPlus this warning doesn’t anymore occur.
    But I have an other problem. Nothing is publisher on my G+ account. ;-)
    I am in discussion with Jophn and mBurke (he is German).

  3. The dev version doesn’t cause any errors… but when publishing a post, nothing appears on G+ (despite using the correct email/pass in the settings).

    You can delete the trackbacks, btw. It’s not live yet as I unpublished it.

  4. Just a quick question. I just installed the plugin and enabled it, it has been a few minutes but none of the posts have appeared in Google+. Is it not working for me or does it just take some time for the post to appear?

  5. Posts only get posted when you publish them – existing posts won’t get published.

    I should also note the plugin is quite “beta” – you’ll see in the support threads in the forums you’ll likely need to make some changes to get it working.

    I believe, for now, the best approach is to edit line 36 of gplus.php to set redirection to 5 instead of 0 – but I haven’t had time to troubleshoot / debug and publish a new version.

    (I’m working to publish a 0.8.5 version which at least fixes this issue)

Comments are closed.