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


"ClientID required" exception because FacebookApplication.Current is not set by FacebookWebContext


For the description of the issue and for a workaround see:

The problem is that when FacebookWebContext is instantiated with app settings then FacebookApplication.Current doesn't properly get set. The other way around: FacebookSession uses FacebookApplication.Current, but IMHO not a kind of global object should be used but the IFacebookApplication instance passed around.
Closed Oct 19, 2011 at 1:17 AM by prabirshrestha
fixed in v5.3


prabirshrestha wrote Sep 12, 2011 at 1:59 PM

could you download the latest source code and check it out.

Piedone wrote Sep 12, 2011 at 4:50 PM

Wow, thank your for the very quick reply and fix! Because it was indeed a fix: authentication now works as expected.

prabirshrestha wrote Sep 12, 2011 at 5:53 PM

i will leave it as it is for now. you will need to manually build it. once we get more testers, will release a new version next week.

Piedone wrote Sep 12, 2011 at 9:39 PM

I've already built it and using the dll instead the ones I've downloaded from here. Thank you and the whole team for your efforts!

pragneshs9 wrote Jul 5, 2012 at 6:55 AM

Previously i was using facebook v5.2 with below code
var fbWebContext = new FacebookWebContext(FacebookApplication.Current, ControllerContext.HttpContext);
if (fbWebContext.IsAuthorized("user_about_me,publish_stream,email,user_status".Split(',')))
var fb = new FacebookWebClient(user.FacebookAccessToken);
                dynamic me = fb.Get("me");                    
                string first_name = me.first_name;

string last_name = me.last_name;

Above code was working fine but i have to add the offline_access for long live session it was expire with in 2 hours so i download the facebook v6 version. After updating the version the above code stops working.
Please give me the solution as early as possible.

pragneshs9 wrote Jul 5, 2012 at 7:36 AM

FacebookWebContext(IFacebookApplication settings, HttpContextBase httpContext)
I am not getting the IFacebookApplication interface. how can i pass the settings value.
Could not load type 'Facebook.FacebookApplication' from assembly 'Facebook, Version=, Culture=neutral, PublicKeyToken=58cb4f2111d1e6de'.