We can find out the Request for permissions URL of a Facebook application as we discussed previously.
Facebook API – Request for permissions URL
So you can force the user to grant the permissions for your Facebook application by checking their login status and redirecting to the above URL if they are unknown user.
$(document).ready(function() { FB.getLoginStatus(function(response) { if (response.authResponse) { // logged in and connected user, someone you know } else { // no user session available, someone you dont know window.top.location.href = "https://www.facebook.com/dialog/oauth?client_id=[FB_APP_ID]&redirect_uri=[FB_APP_URL]&scope=[PERMISSIONS]"; } }); });
Done =)
Reference: Facebook Developers – FB.getLoginStatus
thank you!
LikeLike
you ar welcome~ =)
LikeLike