And*_*dri 15 html twitter url facebook google-plus-one
我想知道是否有一种方法可以仅使用HTML为Facebook,Twitter和Google +1创建"共享"按钮,而无需在任何时候将任何Javascript插入代码中.
例如,您可以使用下面描述的方法动态创建这些按钮; 然而他们最终都动态加载Javascript并在幕后创建自己的代码:
And*_*dri 24
以下链接将注册相应的喜欢,推文和+ 1:
这些链接适用于Wordpress:
Facebook的
<a href="http://www.facebook.com/sharer.php?u=<?php if(is_home()){echo home_url();}else{the_permalink();} ?>" target="_blank" title="Share this page on Facebook">Like</a>
Run Code Online (Sandbox Code Playgroud)
推特
<a href="http://twitter.com/share?url=<?php if(is_home()){echo home_url();}else{the_permalink();} ?>&text=<?php the_title(); ?>" target="_blank" title="Tweet this page on Twitter">Tweet</a>
Run Code Online (Sandbox Code Playgroud)
谷歌+1
<a href="https://plusone.google.com/_/+1/confirm?hl=en&url=<?php if(is_home()){echo home_url();}else{the_permalink();} ?>" target="_blank" title="Plus one this page on Google">+1</a>
Run Code Online (Sandbox Code Playgroud)
谷歌加上没有在上面的例子中工作.
我用这个用于google plus.
<div id="custom-google-button">
<a href="https://plus.google.com/share?&hl=en&url=YOUR_URL_to_share" target="_blank">google+</a>
</div>
Run Code Online (Sandbox Code Playgroud)
在Wordpress中:
<a href="https://plus.google.com/share?hl=en&url=<?php if(is_home()){echo home_url();}else{the_permalink();} ?>" target="_blank" title="Plus one this page on Google">google+</a>
Run Code Online (Sandbox Code Playgroud)
Linkedin:
<div id="custom-linkedin-button">
<a href="http://www.linkedin.com/shareArticle?mini=true&url=YOUR_URL_to_share" target="_blank">Linkedin</a>
</div>
Run Code Online (Sandbox Code Playgroud)
在Wordpress中:
<a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php if(is_home()){echo home_url();}else{the_permalink();} ?>" target="_blank">Linkedin</a>
Run Code Online (Sandbox Code Playgroud)
资料来源:
| 归档时间: |
|
| 查看次数: |
22536 次 |
| 最近记录: |