Reputation: 108
i want to use Google+ interactive post for my webpage. I implemented this function according to the instructions here. Everything works fine. But if the user wants to select people or circles, with whom he wants to share the post pops up an error message "Invalid credentials (missing or invalid oAuth token)". Console shows error "Object init is not defined" in file picker.js on Google servers. I created empty page only with Google+ interactive post functionality (like in this presentation video) but with same results.
Doing I am something wrong? Or this error is on google side?
It is another way to share the post with a predefined message on G+?
Thanks for reply and sorry for my bad english.
Code example:
<!DOCTYPE thml>
<html>
<head>
<title>Example</title>
</head>
<body>
<button
class="g-interactivepost"
data-contenturl="http://www.mediasolution.cz"
data-contentdeeplinkid="/"
data-clientid="xxx.apps.googleusercontent.com"
data-cookiepolicy="single_host_origin"
data-prefilltext="Message for friends."
data-calltoactionlabel="REGISTER"
data-calltoactionurl="http://www.mediasolution.cz"
data-calltoactiondeeplinkid="/">
Share
</button>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/client:plusone.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
</body>
</html>
Upvotes: 2
Views: 387
Reputation: 56
This is broken period. I have not found a single working live implementation anywhere. They all do the same thing. The only place it is configured to work is at "https://developers.google.com". If you inspect the dom to the iframe you can launch it directly. If you change that origin to your own site it will fail.
If ANYONE cares about this... please star or comment on the google dev bug report for it and maybe it'll get fixed.
Upvotes: 2