简体   繁体   English

Facebook C# SDK - 使用哪个 DLL

[英]Facebook C# SDK - Which DLL to use?

I just downloaded the latest version of the Facebook C# SDK.我刚刚下载了最新版的Facebook C# SDK。 I am migrating from the old Facebook Developer Toolkit.我正在从旧的 Facebook 开发人员工具包迁移。

I am using.Net 3.5 VS 2008. I will be using this SDK in Web and Console based apps.我正在使用.Net 3.5 VS 2008。我将在 Web 和基于控制台的应用程序中使用这个 SDK。 I noticed that the DLLs come in different flavors (Facebook, FacebookWeb, FacebookWebMvc).我注意到 DLL 有不同的风格(Facebook、FacebookWeb、FacebookWebMvc)。 I am confused at to which one should I use for my Web and Console apps?我对我的 Web 和控制台应用程序应该使用哪一个感到困惑?

Also, what is the use for Facebook.Contracts.dll?另外,Facebook.Contracts.dll有什么用? Do I need to add it as a reference?我需要添加它作为参考吗?

Any pointers?任何指针?

UPDATE:更新:

While trying to use the Facebook.Web.dll in my web app the following give me this error:"Precondition failed: .string.IsNullOrEmpty(settings:AppId)": While trying to use the Facebook.Web.dll in my web app the following give me this error:"Precondition failed: .string.IsNullOrEmpty(settings:AppId)":

FacebookWebClient client = new FacebookWebClient(token);

The error goes away if I change it to:如果我将其更改为:

FacebookClient client = new FacebookClient(token);

I am not sure why since there is VERY little documentation.我不知道为什么,因为文档很少。 So I guess I am going to stick to using the Facebook.dll for my Web app as well.所以我想我也会坚持在我的 Web 应用程序中使用 Facebook.dll。

You need the Facebook assembly for any project;任何项目都需要 Facebook 组件; it is the core assembly and the others depend on it.它是核心组件,其他组件依赖于它。 Use just Facebook for your console application.仅将 Facebook 用于您的控制台应用程序。 Use Facebook + FacebookWeb for a Web Forms project.将 Facebook + FacebookWeb 用于 Web Forms 项目。 Use Facebook + FacebookWebMvc for an MVC project.将 Facebook + FacebookWebMvc 用于 MVC 项目。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM