Skip to content

Instantly share code, notes, and snippets.

@TomMalbran
Created August 22, 2016 20:03
Show Gist options
  • Save TomMalbran/43a1e8e1f67a41d8f2c2b5f2a0f4b4e8 to your computer and use it in GitHub Desktop.
Save TomMalbran/43a1e8e1f67a41d8f2c2b5f2a0f4b4e8 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Install</title>
<script type="application/javascript" src="//connect.facebook.net/es_LA/sdk.js"></script>
<script>
FB.init({
appId : "FB APP Key",
version : "v2.1",
status : true,
cookie : true,
xfbml : false,
oauth : true
});
FB.getLoginStatus(function (response) {
if (response.status === "connected") {
FB.ui({ method: 'pagetab' });
} else {
FB.login(function () {
FB.ui({ method: 'pagetab' });
});
}
});
</script>
</head>
<body>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment