webtechnick / CakePHP-Facebook-Plugin

CakePHP Facebook Plugin
http://facebook.webtechnick.com
445 stars 138 forks source link

Custom Login Permissions #38

Closed leckstein closed 12 years ago

leckstein commented 12 years ago

Firstly this is a great plugin that saved me loads of time, thank you!

The login control is ignoring permissions when custom is set to true because the 'scope' option is hard coded to 'email' in the javascript login function.

I fixed this by passing through the perms string to the login function, for reference here are my changes to the FacebookHelper class: 113 - $perms = isset($options['perms']) ? $options['perms'] : 'email'; $onclick = "login('".$options['redirect']."', '".$perms."');";

497 - function login(redirection, perms){

510 - }, {scope: perms});

webtechnick commented 12 years ago

Thank you for reporting this issue. This is no longer the case in master. Please refer to the lastest release 3.1.1.