What did you do to the namespaces in 2.0?

Aug 4, 2008 at 7:27 PM
Edited Aug 4, 2008 at 9:36 PM
Ok, maybe I did this wrong...

But I downloaded the binaries and tried to compile my app against them and....  errors.  bigtime.

For some reason, it doesn't recognize many of the namespaces.  It recognizes Facebook and Facebook.WebControls, but that's it.  I get a lot of errors like this :

The type or namespace name 'Entity' does not exist in the namespace 'Facebook' (are you missing an assembly reference?)
The type or namespace name 'Components' does not exist in the namespace 'Facebook' (are you missing an assembly reference?)

Furthermore, when I go through intellisense to find out what's in the Facebook namespace, I see that there's a Facebook namespace (uppercase F) and a facebook namespace (lowercase f). 

What's going on?

BTW - I'm currently using v. 1.6 of the framework...  So if there's anything I should know about switching from 1.6 to 2.0, please let me know.
Aug 5, 2008 at 12:07 AM
Grab the source code to make things much easier for you  - there are some very big changes where everything was split and refactored into more logical divisions to mirror the facebook API. Look at facebook.Schema.XXXX in order to find the classes and functionality you're looking for.
Aug 5, 2008 at 12:26 AM

As you have noticed, 2.0 is not backward compatible with 1.X code.  We changed namespaces to sync up with facebook's namespaces that are published on the developer wiki http://wiki.developers.facebook.com/index.php/API. While we understand this may cause pain to existing developers having to change how their code acceses the api, this will allow future modifications to the API to be much easier, such as when Facebook Connect becomes fully available.  Take a look at our desktop sample application to see a couple simple examples of how to call into the new interface.

Aug 5, 2008 at 4:23 PM
Edited Aug 5, 2008 at 4:35 PM
Huh, I had no idea that 2.0 would be structured so differently.  I wish we had some sort of document or readme file explaining the changes. 

Question - where can I find this facebook.Schema.XXX file?

Also, what's up with using a lowercase f for the facebook namespace?  Did you do that on purpose?
Aug 6, 2008 at 7:38 PM
Edited Aug 6, 2008 at 7:40 PM
Documentation is coming shortly. 

Schema files can be located in here:  <root>\FacebookToolkit\Source\Facebook\Schema

We also didn't like the lowercase names in the API as we were developing the toolkit, but we are doing it to be consistent with the xsd that facebook is publishing  (http://api.facebook.com/1.0/facebook.xsd).  When we run this through Linq2XSD to get entity objects and parsers, we get lower-case objects.  We thought about wrapping each object with a Upper-Case object, but that caused a lot more headache than it was worth, negating any advantage of having a lightweight wrapper around the API.  This also has the advantage of being consistent with the other PHP examples you may see out on the web.