hyp*_*jas 7 javascript jquery google-plus-one google-plus
在此链接中,我学会了为Google +1按钮指定网址.
我还可以指定特定图像吗?
编辑
我不需要更改Google plus按钮gif或Google plus按钮的背景.我需要指定用户想要在社交网络中共享的图像.
有可能吗?
Bre*_*ttJ 10
是的,这是可能的.
您的意思是,您希望指定一个图片,该图片会显示在通过Google+共享生成的代码段中.+1按钮有两个功能:1)点击时会为点数添加+1,2)可选择允许用户将您的网址分享给Google+并对其进行评论.
你要问的是这种互动的第二部分,并记录在https://developers.google.com/+/plugins/snippet/
该页面有一个工具,可以帮助您生成您需要插入页面的HTML.您还可以选择三种不同的方法来指定代码段信息.
使用schema.org标记的示例:
<!-- 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 Cool Article">
<meta itemprop="description" content="This is the greatest site ever">
<meta itemprop="image" content="http://example.com/mycoolimage.png">
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
14359 次 |
最近记录: |