Dán code FB Like lên trang home
Bởi Nguyen Van Luyen - Anh Phượng cho em hỏi em đã vào plugin của FB để lấy code rồi giờ em muốn đưa nó lên trang home thì làm thế nào ạ?
Giống như này
Re: Dán code FB Like lên trang home
Bởi Phoenix Hoang - Bạn vào https://developers.facebook.com/docs/plugins/page-plugin
Và làm như hình:
- Sau đó, chọn get code - sẽ được 2 đoạn code:
Đoạn 1: Bạn dán vào Additional HTML [Home / ►Site administration / ►Appearance / ►Additional HTML-When BODY is opened].
<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 = 'https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.11&appId=313931345356848'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
Đoạn 2: Bạn dán vào Block HTML
[Place this code wherever you want the plugin to appear on your page].
[Place this code wherever you want the plugin to appear on your page].
<div class="fb-page" data-href="https://www.facebook.com/thpttrian/" data-width="230" data-height="230" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/thpttrian/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/thpttrian/">Diễn đàn Trường THPT Trị An _ ThayTro.Net</a></blockquote></div>
Step 2: Place this code wherever you want the plugin to appear on your page.
<iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2Fthpttrian%2F&tabs&width=230&height=230&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId=313931345356848" width="230" height="230" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
Trả lời: Re: Dán code FB Like lên trang home
Bởi Nguyen Van Luyen - Block HTML là mình phải ADD A BLOCK hả anh? Em Add block HTML rồi dán vô nhơng ko đc, hiện nguyên code ko à.
Re: Trả lời: Re: Dán code FB Like lên trang home
Bởi Phoenix Hoang - Bạn bật chế độ chỉnh sửa - Add a HTML block - sau đó chỉnh sửa html block. Trước khi dán code vào bạn phải chọn chế độ html - có biểu tượng <> sau lưu lại.
Trả lời: Re: Trả lời: Re: Dán code FB Like lên trang home
Bởi Nguyen Van Luyen - Thanks anh. Em làm đc rồi.