征服者!
我实现了一个Facebook分享按钮,在移动视图中非常精细除之外。看看:http://parkfreunde-weissensee.berlin/2017/07/04/jetzt-handeln-die-gelegenheit-war-nie-so-guenstig
看起来网址不会在智能手机上传输。知道我必须修改代码吗?
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&version=v2.8&appId=123456789";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
按钮
<div class="facebook-share__article-footer__container">
<div class="facebook-share__article-footer">
<?php
// $title=urlencode('');
$url=urlencode(get_permalink($post->ID));
// $summary=urlencode('');
// $image=urlencode('');
?>
<a onClick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=<?php echo $title;?>&p[summary]=<?php echo $summary;?>&p[url]=<?php echo $url; ?>&&p[images][0]=<?php echo $image;?>', 'sharer', 'toolbar=0,status=0,width=548,height=325');" target="_parent" href="javascript: void(0)" class="single-post__social-media-button-invert">Auf Facebook teilen</a>
</div>
</div>
柏林致以最诚挚的问候 蒂博尔