是否有可用于C#Facebook Sdk的Monotouch端口?(Is there a Monotouch port available for the C# Facebook Sdk?)

Monotouch需要为Iphone / Ipad专门构建。 有没有可用的DLL? 还是源代码?

谢谢,

乔恩

Monotouch requires a special build for the Iphone/Ipad. Is there a DLL available? Or source code?

thanks,

Jon

最满意答案

简答 - 是的!

我为MonoTouch创建了一个简单的C#Facebook SDK端口。 这不是任何官方的手段,但它需要我按摩来自Mono的MCS的一些位,以使其兼容。 它也适用于MonoTouch的AOT(Ahead of Time)编译方案。

用法

不幸的是,你不会在MonoTouch中看到“动态”或“ExpandoObject”,看到我有关AOT编译的一点^。 所以基本上你需要使用.NET 3.5 API或者我喜欢称它为“魔术字符串ftw!” 从SDK文档:

var client = new FacebookClient(); var me = (IDictionary<string,object>)client.Get("me"); string firstName = (string)me["first_name"]; string lastName = (string)me["last_name"]; string email = (string)me["email"];

去Git吧!

https://github.com/anujb/MonoMobile.Facebook

随意贡献。 我可以想象有大量的助手可以创建并可用于帮助使用MonoTouch的iOS开发人员减少开发这些应用程序的摩擦。 有相当多的基础结构对大多数iOS用户界面需求都很常见

谢谢。

Anuj

Short Answer -- Yes!

I have created a simple port of the C# Facebook SDK for MonoTouch. It's not official by any means but it required me massaging some of the bits from Mono's MCS to make it compatible. It also plays nice with MonoTouch's AOT (Ahead of Time) compilation scheme.

Usage

Unfortunately you don't get 'dynamic' or 'ExpandoObject' in MonoTouch see my bit about AOT compilation ^. So basically you are required to use the .NET 3.5 APIs or as I like to call it "magic strings ftw!" From the SDK docs:

var client = new FacebookClient(); var me = (IDictionary<string,object>)client.Get("me"); string firstName = (string)me["first_name"]; string lastName = (string)me["last_name"]; string email = (string)me["email"];

Go Git It!

https://github.com/anujb/MonoMobile.Facebook

Feel free to contribute. I can imagine there are tons of helpers that can be created and made available to aid iOS developers using MonoTouch decrease the friction of developing these apps. There are quite a few base constructs that are common for most iOS UI requirements

Thanks.

Anuj

更多推荐