Thêm Bình Luận Facebook cho Xenforo 2

Chào các bạn, xin hướng dẫn các bạn cách chèn và quản lý bình luận Facebook cho Xenforo 2

1. Bạn vào Admin > Appearance > Template tìm đến thread_view
Xem thêm: [xf2] Mã nguồn tao dựng diễn đàn Xenforo 2.1.8 Patch 2 full nulled
Tìm
HTML:
<div class="blockMessage blockMessage--none">
Thay thành
HTML:
<!-- Facebook tranthanh.name.vn -->
<div class="block-container">
<h3 class="block-header">
Facebook Comments
</h3>
<div class="fb-comments" data-href="{{ link('full:threads/'.($thread.thread_id)) }}" data-width="100%" data-numposts="10" data-order-by="reverse_time" data-colorscheme="light"></div>
</div>
<!-- Facebook tranthanh.name.vn -->
<div class="blockMessage blockMessage--none">
2. Bạn vào developers.facebook.com tạo cho mình 1 app nhé, mình đã tạo cho mình 1 app với ID là 123456789
3. Vào template PAGE_CONTAINER
Tìm
HTML:
<div class="p-pageWrapper" id="top">
Thay thành
[CODE=html]<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/vi_VN/sdk.js#xfbml=1&version=v3.2&appId=[B][COLOR=rgb(226, 80, 65)]123456789[/COLOR][/B]&autoLogAppEvents=1';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<div class="p-pageWrapper" id="top">
Thay 123456789 bằng ID mà bạn vừa tạo ở bước 2
Tìm
HTML:
<xf:include template="google_analytics" />
Thay thành
Rich (BB code):
<meta property="fb:app_id" content="123456789" />
<meta property="fb:admins" content="012345678"/>
<xf:include template="google_analytics" />
Thay 123456789 bằng id app của bạn vừa tạo ở bước 2
Thay 012345678 bằng id nick của bạn.
Bạn vào developers.facebook.com/tools/comments để quản lý bình luận nhé
Thêm người quản lý bạn vào đây developers.facebook.com/apps/123456789/roles/roles/
Thay 123456789 bằng ID app mà bạn đã tạo ở bước 2
Vậy là xong rồi
Chúc bạn thành công!

Bình luận

Mới hơn Cũ hơn