mirror of
https://github.com/fergalmoran/dss.git
synced 2026-03-25 23:16:35 +00:00
Load facebook async
This commit is contained in:
@@ -22,7 +22,10 @@
|
||||
window.open "http://twitter.com/share?url=" + "http://" + window.location.host + "/" + model.get("item_url") + "&text=" + model.get("title"), "twitterwindow", "height=450, width=550, top=" + ($(window).height() / 2 - 225) + ", left=" + $(window).width() / 2 + ", toolbar=0, location=0, menubar=0, directories=0, scrollbars=0"
|
||||
|
||||
sharePageToFacebook: (model) ->
|
||||
FB.fbAsyncInit('154504534677009');
|
||||
FB.init({
|
||||
appId : '154504534677009',
|
||||
xfbml : true
|
||||
});
|
||||
FB.getLoginStatus (oResponse) ->
|
||||
if oResponse.status is "connected"
|
||||
FB.ui
|
||||
|
||||
@@ -56,17 +56,12 @@
|
||||
</script>
|
||||
<script>
|
||||
jQuery(window).load(function (appId) {
|
||||
window.fbAsyncInit = function () {
|
||||
FB.init({appId: appId, status: true, cookie: true, xfbml: true});
|
||||
};
|
||||
(function () {
|
||||
var e = document.createElement('script');
|
||||
e.async = true;
|
||||
e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
|
||||
document.getElementById('fb-root').appendChild(e);
|
||||
}());
|
||||
//Write Facebook FBML code to fb-root div
|
||||
document.getElementById("fb-root").innerHTML = '<fb:like-box href="http://www.facebook.com/platform" width="300" stream="false"></fb:like-box>';
|
||||
});
|
||||
</script>
|
||||
{% block footerscripts %}
|
||||
|
||||
Reference in New Issue
Block a user