Created
May 11, 2019 10:21
-
-
Save mak9456/8fe75823a4190501a9f4d83c86ef0d9f 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
ngOnInit() { | |
let self = this; | |
this.loaderService.show(); | |
self.applicationId = "466740060734339"; // **Enter your Created FB App's ID** | |
self.loadFBSDK(); | |
} | |
loadFBSDK() { | |
let self = this; | |
(<any>window).fbAsyncInit = () => { | |
FB.init({ | |
appId: self.applicationId, | |
xfbml: false, | |
version: 'v2.9' | |
}); | |
}; | |
(function (d, s, id) { | |
let js, fjs = d.getElementsByTagName(s)[0]; | |
if (d.getElementById(id)) { return; } | |
js = d.createElement(s); js.id = id; | |
js.src = "//connect.facebook.net/en_US/sdk.js"; | |
fjs.parentNode.insertBefore(js, fjs); | |
}(document, 'script', 'facebook-js-sdk')); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment