I'm using the facebook php sdk 2.1.2 in my web app. I use the getLoginUrl method to request permission t开发者_C百科o the user who's logging in my site.
$facebook->getLoginUrl(array(
'req_perms'=> 'email,read_stream,user_birthday,user_hometown,user_photos'));
I was wondering if there's a way User can ask for optional permission.And what's the difference between req_perms and ext_perms?
best regards
req_perms are permissions that you can set as being 'required' by your application before they can begin using an application.
ext_perms are optional permissions that you can request to enhance the experience for users, the user has the option to specifically allow/disallow each of these permissions on an individual basis.
edit: req_perms and ext_perms have been depreciated and are replaced by a the single 'scope' parameter (which the values will determine what permissions are optional) - thanks Igy
ie: https://developers.facebook.com/docs/authentication/permissions/#extended_perms
If you are using the Enhanced Auth Dialog, extended permissions are presented on the second page of the dialog and are individually user-revocable. If you request these permissions, the user can choose to not grant one or more of them. Your application should not expect the user to always grant these permissions if requested.
精彩评论