如何将我们网站上的内容分享到Google Plus [英] How to share content from our site to google plus
问题描述
如何将我们网站上的内容分享给Google plus
我试过这种方式
< a href =javascript:void(0); onclick =window.open('https://plus.google.com/share?url=<?php echo urlencode('http://example.com');?>& via = example', 'share on Google Plus','width = 600,height = 400,left = 450')。focus(); >
无法分享我网站上的内容。这怎么可能?
我想共享内容(例如:hello),以分享功能加上护目镜。
是的。您可以粘贴应用中的内容,您必须将其设置为默认数据。 https://developers.google.com/+/web/share/interactive#button_attr_calltoactionurl
这里没什么可做的。
只需在开发人员部分创建一个谷歌加应用程序。
然后粘贴下面的部分
<按钮
class =g-interactivepost
data-contenturl =https://plus.google.com/pages/
data-contentdeeplinkid =/ pages
data-clientid =xxxxx.apps.googleusercontent.com
data-cookiepolicy =single_host_origin
data-prefilltext =今天吸引用户,为您的企业创建一个Google+信息页。
data-calltoactionlabel =CREATE
data-calltoactionurl =http://plus.google.com/pages/create
data-calltoactiondeeplinkid =/ pages / create>
告诉你的朋友
< / button>
然后更改数据客户端ID。现在它将按您的预期工作。享受:)
How to share content from our site to google plus
I tried it like this
<a href="javascript:void(0);" onclick="window.open('https://plus.google.com/share?url=<?php echo urlencode('http://example.com');?>&via=example', 'Share on Google Plus', 'width=600,height=400,left=450').focus();" >
Here I can not share content from my site. How it is possible with this? I want to share content (example: hello) to goggle plus with sharing capability
yes. You can paste a content from your app which you have to set as a default data.. https://developers.google.com/+/web/share/interactive#button_attr_calltoactionurl
Nothing much to do here..
Just create a google plus app on the developers section. Then Paste the below portions
<button
class="g-interactivepost"
data-contenturl="https://plus.google.com/pages/"
data-contentdeeplinkid="/pages"
data-clientid="xxxxx.apps.googleusercontent.com"
data-cookiepolicy="single_host_origin"
data-prefilltext="Engage your users today, create a Google+ page for your business."
data-calltoactionlabel="CREATE"
data-calltoactionurl="http://plus.google.com/pages/create"
data-calltoactiondeeplinkid="/pages/create">
Tell your friends
</button>
Then change the data- client id.. Now it will work as per your expectation. Enjoy :)
这篇关于如何将我们网站上的内容分享到Google Plus的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!