This project has moved and is read-only. For the latest updates, please go here.


FacebookWebContext.HasPermission fails


FacebookWebContext.HasPermission fails in some cases because FacebookWebContext.HasPermissions doesn't take its "permissions" parameter into account.

For example, FacebookWebContext.Current.HasPermission("email") fails because it uses FacebookWebContext.Current.HasPermissions(..., ["email"]), which returns ["installed", "email", "status_update", ...] instead of just ["email"].
Closed Feb 6, 2012 at 7:37 PM by ntotten
Please upload sample to repo. Resubmit bug on Github:


prabirshrestha wrote Dec 22, 2011 at 10:57 PM

can u upload a sample reproducing the bug.

fabrice wrote Dec 23, 2011 at 11:33 AM

I may be able to provide a repro, but the problem and the solution are obvious.
A quick look at the incriminated method (FacebookWebContext.HasPermissions ) will allow you to see that the "permissions" parameter is not used. The solution is simply to take that parameter into account.

fabrice wrote Feb 6, 2012 at 9:02 PM

It's too bad this does not get fixed. It's so easy to do!

prabirshrestha wrote Feb 6, 2012 at 10:31 PM

you can fork the v5 branch in github and submit a pull request.