My first post about this is still being held because of its size.
I've hosted the attachment on my server this time instead.

Hello All,

I'm using this Facebook toolkit as I attempt to develop a Facebook app:

http://www.codeplex.com/FacebookToolkit

As crappily engineered as it is, at least it's already written and I
don't have to spin wheels writing boilerplate cruft.  Anyhow ...

Mono is having a problem with the assembly during its use of string
resources.  Hopefully it's not a Mono bug so someone can just set me
straight and I can move forward.

Use this simple program as a test case:

using System;
using Facebook.API;

namespace Testing
{
   class Program
   {
       static void Main(string[] args)
       {
           try
           {
               FacebookAPI api = new FacebookAPI();
               api.CreateSession("xxx");
           }
           catch (Exception e)
           {
               Console.WriteLine(e.Message + Environment.NewLine +
e.StackTrace);
           }
           Console.WriteLine("Done");
       }
   }
}

The output on Windows (it's an error with a stack trace because I'm
supplying a nonsense authentication token) is:

Invalid API key
  at Facebook.API.FacebookAPI.ErrorCheck(XmlDocument doc)
  at Facebook.API.FacebookAPI.LoadXMLDocument(String rawXML)
  at Facebook.API.FacebookAPI.CreateSession()
  at Facebook.API.FacebookAPI.CreateSession(String authToken)
  at Testing.Program.Main(String[] args) in C:\Documents and Settings\abe\Deskt
op\shark\LostAndFound\Testing\Testing\Program.cs:line 13
Done

The output on Linux is:

Exception has been thrown by the target of an invocation.
 at System.Reflection.MonoCMethod.Invoke (System.Object obj,
BindingFlags invokeAttr, System.Reflection.Binder binder,
System.Object[] parameters, System.Globalization.CultureInfo culture)
[0x00000]
 at System.Reflection.MethodBase.Invoke (System.Object obj,
System.Object[] parameters) [0x00000]
 at System.Runtime.Serialization.ObjectRecord.LoadData
(System.Runtime.Serialization.ObjectManager manager,
ISurrogateSelector selector, StreamingContext context) [0x00000]
 at System.Runtime.Serialization.ObjectManager.DoFixups () [0x00000]
 at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject
(System.IO.BinaryReader reader) [0x00000]
 at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph
(System.IO.BinaryReader reader, Boolean readHeaders, System.Object&
result, System.Runtime.Remoting.Messaging.Header[]& headers) [0x00000]
 at 
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize
(System.IO.Stream serializationStream,
System.Runtime.Remoting.Messaging.HeaderHandler handler) [0x00000]
 at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(System.IO.Stream serializationStream) [0x00000]
 at System.Resources.ResourceReader.ReadNonPredefinedValue
(System.Type exp_type) [0x00000]
 at System.Resources.ResourceReader.ReadValueVer2 (Int32 type_index) [0x00000]
 at System.Resources.ResourceReader.ResourceValue (Int32 index) [0x00000]
 at System.Resources.ResourceReader+ResourceEnumerator.get_Value () [0x00000]
 at System.Resources.ResourceSet.ReadResources () [0x00000]
 at System.Resources.ResourceSet.GetObject (System.String name,
Boolean ignoreCase) [0x00000]
 at System.Resources.ResourceSet.GetString (System.String name,
Boolean ignoreCase) [0x00000]
 at System.Resources.ResourceManager.GetString (System.String name,
System.Globalization.CultureInfo culture) [0x00000]
 at Facebook.Properties.Resources.get_FacebookRESTUrl () [0x00000]
 at Facebook.API.FacebookAPI.GetRequestUrl (Boolean useSSL) [0x00000]
 at Facebook.API.FacebookAPI.ExecuteApiCallString (IDictionary`2
parameterDictionary, Boolean useSession) [0x00000]
 at Facebook.API.FacebookAPI.ExecuteApiCall (IDictionary`2
parameterDictionary, Boolean useSession) [0x00000]
 at Facebook.API.FacebookAPI.CreateSession () [0x00000]
 at Facebook.API.FacebookAPI.CreateSession (System.String authToken) [0x00000]
 at Testing.Program.Main (System.String[] args) [0x00000]
Done

The binaries are here:

http://www.digital-pulp.com/downloads/Facebook.zip

Thanks!
-Abe
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to