Last active
February 21, 2016 23:10
-
-
Save goranefbl/bbed8c255de9cbd91c92 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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_US/sdk.js"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-jssdk')); | |
window.fbAsyncInit = function() { | |
FB.init({ | |
appId : 'app_id', | |
xfbml : true, | |
cookie : true, | |
status : true, | |
version : 'v2.5' | |
}); | |
FB.Event.subscribe("xfbml.render", changeSettings) | |
}; | |
var changeSettings = function(token) { | |
console.log("aa"); | |
yourToken = token; | |
FB.api('/app_id', 'POST', { | |
"access_token": "app_id|app_secret", | |
"canvas_url": "https://apps.facebook.com/ognjen", | |
"secure_canvas_url": "https://ognjen.com/canvas/ognjen/" | |
}, | |
function (response) { | |
console.log("bb"); | |
console.log(response); | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment