How do I use the toolkit with

Aug 6, 2008 at 6:44 PM
Is this even possible?

I tried it with 1.6 and it didn't work.  This is what happened :

I went ahead and changed all references in the app and the library from "" to ""

At first I was getting cert errors, because apparently there's no cert for  So I went ahead and modified the code so that it never uses SSL. 

However, now I'm getting an error when I try to authenticate.  Here is where I'm getting the error (in FacebookAPI.c) :

        internal void CreateSession() {
            Dictionary<string, string> parameterList = new Dictionary<string, string>(3);
            parameterList.Add("method", "auth.getSession");
            parameterList.Add("auth_token", AuthToken);
            XmlDocument xmlDocument = ExecuteApiCall(parameterList, false);

            _sessionKey = xmlDocument.DocumentElement.SelectSingleNode("Facebook:session_key", NsManager).InnerText; //This is where I get the error
            _userId = xmlDocument.DocumentElement.SelectSingleNode("Facebook:uid", NsManager).InnerText;

            XmlNode secretNode = xmlDocument.DocumentElement.SelectSingleNode("Facebook:secret", NsManager);
            if (_isDesktopApp && (secretNode != null && !string.IsNullOrEmpty(secretNode.InnerText))) {
                _secret = secretNode.InnerText;
            double expires =
                double.Parse(xmlDocument.DocumentElement.SelectSingleNode("Facebook:expires", NsManager).InnerText,

            _sessionExpires = false;

            if (expires > 0)
                _sessionExpires = true;

This is the error that I get : Object reference not set to an instance of an object
Aug 6, 2008 at 8:21 PM
Nevermind.  Just solved this one.  Instead of doing a global search and replace, I changed the FacebookRESTUrl in the Resources for the project from to

So, for the people at home, here's how to make the libaray work with :

1) Turn off SSL.  Not terribly secure, but this is only temporary until becomes  Besides the PHP libarary apparently does everything unencrypted.  To turn off SSL, change the GetRequestUrl function in FacebookAPI.cs so it looks like this :

        internal string GetRequestUrl(bool useSSL)
            string returnValue = Facebook.Properties.Resources.FacebookRESTUrl;
            /*if (useSSL) {
                returnValue = returnValue.Replace("http", "https");

            return returnValue;

2) Go into the Resources for your project and change the FacebookRESTUrl to

And that, as they say, is that.
Aug 7, 2008 at 3:07 PM
If I switch my facebook profile to the old version and remove my app, reinstalling is absolutely no problem. With the new profile, I get an infinitive loop when I try to install it (the URL changes between and, but nothing happens).

No one with the same problem here?

Thanks in advance!

Aug 7, 2008 at 3:39 PM
I've got the same issue but have not found a solution yet. If I come across anything I'll let you know. Hopefully somebody else has found this problem and solved it already.
Aug 7, 2008 at 4:12 PM
I found an answer to the looping problem here:

Aug 8, 2008 at 11:09 AM
@ msurel
Thanks a lot! :)