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 6:37 PM by ntotten
Please upload sample to repo. Resubmit bug on Github: https://github.com/facebook-csharp-sdk/facebook-csharp-sdk/issues


prabirshrestha wrote Dec 22, 2011 at 9:57 PM

can u upload a sample reproducing the bug.

fabrice wrote Dec 23, 2011 at 10: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 8:02 PM

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

prabirshrestha wrote Feb 6, 2012 at 9:31 PM

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