我知道这是可能的Facebook,但我找不到任何有用的谷歌按钮代码.
我为我的Facebook分享按钮(已经工作)得到的代码是:
<a title="send to Facebook" href="http://www.facebook.com/sharer.PHP?s=100&p[Title]=EHBE Groningen&p[summary]=this is the text to share http://sharelink.com&p[url]=www.example.nl&p[images][0]=example_image" target="_blank"> <span> <img wIDth="14" height="14" src="'icons/fb.gif" alt="Facebook" /> Facebook </span></a>
我目前为我的推文按钮(也工作)得到的代码是:
<a href="http://twitter.com/?status=text to tweet" onclick="JavaScript:_gaq.push(['_trackEvent','outbound-article','http://twitter.com']);" target="_blank">Tweet over deze pagina</a>
所以我的问题是,当喜欢,分享或发推某个谷歌按钮的页面或文章时,是否可以显示预定义的文本.
编辑
我希望能够更改实际单击按钮时显示的文本.所以按钮本身很好.
解决方法 你无法做到Facebook和Twitter提供的方式,我可以收集他们看到他们的 Snippet documentation.你能做什么,是这样的:
<!-- Update your HTML tag to include the itemscope and itemtype attributes. --><HTML itemscope itemtype="http://schema.org/Article"><!-- Add the following three Tags insIDe head. --><Meta itemprop="name" content="my Title"><Meta itemprop="description" content="a description"><Meta itemprop="image" content="http://my-url.com/logo.png">
我意识到,如果您的内容是通过AJAX加载的,那可能会很痛苦.在这种情况下,您可以执行以下 *** 作:
<body itemscope itemtype="http://schema.org/Product"> <h1 itemprop="name">my Title</h1> <img itemprop="image" src="http://my-url.com/logo.png" /> <p itemprop="description">a description</p></body>总结
以上是内存溢出为你收集整理的html – 在共享按钮中显示默认文本?全部内容,希望文章能够帮你解决html – 在共享按钮中显示默认文本?所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)