Created
November 6, 2020 14:22
-
-
Save novaknole/332e27308687d6ec66eea6d06b78a272 to your computer and use it in GitHub Desktop.
This file contains 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
FB.init({ | |
appId: process.env.FACEBOOK_ID, | |
version: "v3.3", | |
status: true, | |
cookie: true | |
}); | |
let share = { | |
method: "feed", | |
link: | |
process.env.NODE_ENV === "development" | |
? "https://github.com" | |
: process.env.WEBSITE_URI | |
}; | |
FB.ui(share, async response => { | |
if (typeof response == "undefined") { | |
ShowNotificationMessage("Ah. We couldn't detect that you shared this on social media. Sorry for that.", 'error', 3000) | |
return; | |
} | |
console.log("shared has just happened"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment