我如何定制这样的大型Facebook和Twitter分享按钮?

时间:2014-05-05 07:11:42

标签: php html css facebook wordpress

首先,我知道FB“分享”按钮已被弃用,但事实是我碰巧找到了这个网站22words.com,并且真的很喜欢最后出现的大FB和Twitter分享按钮所有帖子。

有谁知道如何做到这一点?

非常感谢任何帮助!

5 个答案:

答案 0 :(得分:7)

只需使用:

<a href='https://www.facebook.com/sharer/sharer.php?u=THELINKTOSHARE'>Share on Facebook</a>

并添加自己的样式,使其显得随心所欲。

对于Twitter使用:

<a href="https://twitter.com/home?status=THELINKTOSHARE">Share on Twitter</a>

答案 1 :(得分:1)

使用您的Facebook用户名和密码登录FacebookDeveloper网站

然后点击DOC菜单 - &gt;分享 - &gt;社交插件

在该页面中,您可以看到JS,JQ,HTMl等11个Facebook插件(喜欢,分享等)代码。

只需将代码复制并复制到源代码中......简单:)

答案 2 :(得分:0)

答案 3 :(得分:0)

for facebook

<a href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fparse.com" target="_blank"> <img src="YOURIMAGEURL" /> </a>

了解更多简要信息Click here

答案 4 :(得分:0)

要将其实际插入到WP中,请将其粘贴到functions.php文件中: 请参阅codex

add_filter( 'the_content', 'my_the_content_filter', 20 );

function my_the_content_filter( $content ) {
        $content .= '<div class="social"><a href="https://www.facebook.com/sharer/sharer.php?u='.get_permalink().'">Share on Facebook</a>';
        $content .= '<a href="https://twitter.com/home?status='.get_permalink().'">Share on Twitter</a>
        </div>';   
    return $content;    // Returns the content.
}

添加图片和CSS。

相关问题