我在Facebook文档中发现不清楚如何将引荐代码插入网站上已有的“为JavaScript加载Facebook SDK”代码中。 这是我已经运行良好的东西:
user is shareHolder has both(farm and share).
user is shareHolder has share.
user is shareHolder has farm.
user is Employee
这是Facebook在THIS页上说的推荐代码:
<!-- Load Facebook SDK for JavaScript -->
<div id="fb-root"></div>
{literal}<script>
window.fbAsyncInit = function() {
FB.init({
xfbml : true,
version : 'v3.3'
});
};
(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/fr_FR/sdk/xfbml.customerchat.js';
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>{/literal}
<!-- Your customer chat code -->
<div class="fb-customerchat"
attribution=setup_tool
page_id="00000000000000"
greeting_dialog_display="hide"
logged_in_greeting="Hello!"
logged_out_greeting="Bye!">
</div>
<!-- End your customer chat code -->
感谢您的帮助!