I enabled two new features in one of my applications. One of these features require only the 'email' permission and the other requires only 'friends_birthday'.
I obviously use some PHP code (via the FB Graph API) to check if the user has already enabled the permission before I show a link or dialog with information regarding the new feature. So no, I do not request these specific permissions 开发者_开发百科during the "login" process.
This is an example of the code I use to request a permission using Facebook's JS SDK:
function requestPerm(){
FB.ui({
method: 'permissions.request',
display: 'iframe',//FYI: popup is forced for this permission
perms: 'friends_birthday'
},function(response){
if(response && response.perms){
enable_FriendBdayFeature();//load new content via AJAX
}else{// if(!response.perms){
skip_FriendBdayFeature();//hide link/msg
}
});
}
This is exactly the same way I request the "publish_stream" permission, which does in fact have the "Remove" link in the Application Settings page.
So the short question would be: Is it possible to enable the "Remove" link for specific extended permissions?
The permissions which are marked as 'required' in your example are data permissions. It doesn't make sense for these to be optional as you should already only be asking for those permissions your application expressly requires to operate - allowing the user to opt-out of those would then cause your application to work incorrectly (i.e if you don't need a certain piece of information, don't ask for it).
The other permissions are 'extended' permissions which by their nature shouldn't be needed for most use-cases (e.g presence information or ability to post to the user's wall without using Facebook's SDK-supplied dialogs)
Basically put, Facebook has confusingly made these prerequisites for the information you have requested. ie. If I ask someone how old are you?
first I have to know in reference to Jim
.
See documentation
精彩评论