[Mono-list] Windows vs Linux - different behavior using Facebook.dll
Abe Gillespie
abe.gillespie at gmail.com
Thu Oct 11 16:48:18 EDT 2007
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
Attached are the binaries (rename it to *.zip).
Thanks!
-Abe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Facebook.piz
Type: application/octet-stream
Size: 44172 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-list/attachments/20071011/6fcaf011/attachment-0001.obj
More information about the Mono-list
mailing list