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!
Cool, just installed this. Will let you know how it goes :)
Does this have the ability to post to Google+ Pages and not just personal profiles?
Not currently, no. Love to see it in the future, though it might need to wait for an official API from Google.
In-ter-es-ting, I’ll check this out John. Always the plugin innovator!
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
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).
Ari – can you install the development version and try that?
You can get it at http://wordpress.org/extend/plugins/wpgplus/download/
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.
Thanks Ari.
I’d encourage everyone to follow the discussion over in the WordPress support forum for WPGPlus.
In fact I’ll probably disable comments here just so as not to use this comments thread for troubleshooting – far better to use the forum.
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?
Sorry about that last comment did not read the post above it. About Support.
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)