I’m using Facebook JS SDK to develop a Facebook Page Tab application. There is a button in landing page. When clicked, user will be asked to install the App if they haven’t done so.
The codes are as follow:
<script type="text/javascript">
function installApp() {
FB.login(function(response) {
if (response.authResponse) {
var accessToken = response.authResponse.accessToken;
}
if (response.status === 'connected') {
window.location = 'share.php';
} else {
alert('Please install app first');
}
}, {scope:'friends_likes,email'});
}
</script>
By default FB.Login will result in a popup box asking for permission. Is there any alternative way to AVOID the popup box? I have seen other Facebook apps successfully achieve this, but I have no idea how they did it.
Have you went through the Authentication documentation?
It pretty much cover all of the options that are available to you. i.e.:
You can probably use any of those approaches, but the 3rd probably will fit best.