我搜索我試圖這麼多的方法來讓我自己的風格的Facebook分享按鈕(此按鈕可以讓你分享當前頁面)如何自定義/風格的Facebook分享按鈕
https://developers.facebook.com/docs/plugins/share-button/
由於該按鈕是一個iframe,我們無法訪問它並設計它,我明白這一點。但我不知道一些網站有不同風格的分享按鈕?
<!DOCTYPE html>
<html>
<head>
<title>Your Website Title</title>
<!-- You can use Open Graph tags to customize link previews.
Learn more: https://developers.facebook.com/docs/sharing/webmasters -->
<meta property="og:url" content="http://www.your-domain.com/your-page.html" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Your Website Title" />
<meta property="og:description" content="Your description" />
<meta property="og:image" content="http://www.your-domain.com/path/image.jpg" />
</head>
<body>
<!-- Load Facebook SDK for JavaScript -->
<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/en_US/sdk.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- Your share button code -->
<div class="fb-share-button"
data-href="http://www.your-domain.com/your-page.html"
data-layout="button_count">
</div>
</body>
</html>
你可以分享你的實現? – bhansa
我已更新 – saifaldeen
https://stackoverflow.com/questions/9493988/how-to-trigger-facebook-like-button-from-custom-button – bhansa