Facebook C# SDK - Which DLL to use? - facebook

I just downloaded the latest version of the Facebook C# SDK. I am migrating from the old Facebook Developer Toolkit.
I am using .Net 3.5 VS 2008. I will be using this SDK in Web and Console based apps. I noticed that the DLLs come in different flavors (Facebook, FacebookWeb, FacebookWebMvc). I am confused at to which one should I use for my Web and Console apps?
Also, what is the use for 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)":
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.

You need the Facebook assembly for any project; it is the core assembly and the others depend on it. Use just Facebook for your console application. Use Facebook + FacebookWeb for a Web Forms project. Use Facebook + FacebookWebMvc for an MVC project.

Related

Facebook SDK for .NET Core

Up until now I've been using Facebook SDK for .NET by https://hackerapp.com/
I want to upgrade my project to ASP.NET Core, but I see that their library doesn't have support for .NET Core - nor do they mention about upcoming support for .NET Core.
I can write an HTTP wrapper against Facebook API - but that seems like over-complicating my app - when there's a nice library that is made just for that.
Does anyone know about Facebook SDK for .NET Core?
So after not finding a solution, I've decided to develop my own some time ago. You may find here: https://github.com/developer82/FacebookCore
I don't know why you got a -1, but I am facing the same issue.
Therefore for now I am going to use the OAUTH provided by .Net then direct requests to the graph API...
The other option I know would be to have a look there:
https://github.com/Microsoft/winsdkfb
And there for some more advanced features:
https://github.com/Microsoft/UWPCommunityToolkit/tree/dev/Microsoft.Toolkit.Uwp.Services/Services/Facebook
I am thinking about porting a SDK to .Net Core, but that may be too much work!

What's best solution to use facebook SDK NOW in Xamarin.forms - PCL project?

I'm making app with using Xamarin.forms. (PCL project)
I want to use facebook SDK to use
- get my profile. (name, e-mail)
- get my friends list. (their account id)
- posting on my wall.
I searched it and there are many options for that.
And Some solution seems like out of date. (not updated)
using Xamarin.Auth. (Component)
https://www.youtube.com/watch?v=cyq_ho4QflQ
looks like it's not using facebook app to log in that user installed on their phone.
The Outercurve Foundation's Facebook SDK (Component) https://components.xamarin.com/view/facebook-sdk
many people recommended to use it. but
In rating page, people says that it's out of date and useless now. (because it's not updated and facebook rule's changed)
Facebook SDK by Xamarin from nuGet Package.
Xamarin developer says that there is no FB SDK for PCL project so far.
I'm curious that what is the good way to use facebook SDK?
It must have been being used by many developers who make app with using Xamarin.forms.
Are you guys uses Dependency Service with native SDK?
No 3 is your best option. Correct, there is no Xamarin-Facebook binding library for PCL. However, it's fairly easy to make it happen with dependency injection. Either with the DependencyService or other container.

Facebook User Login in XNA-GameStudio for Windows Desktop

Is it possible to do user authentication / user-login for Facebook-Api inside a Visual Studio C# project using XNA Game Studio? I need to generate the access-token to post a message on a user's facebook wall.
Currently I managed to do it with a WinForms application using this tutorial (English):
http://blog.prabir.me/posts/facebook-csharp-sdk-writing-your-first-facebook-application-v6
or this tutorial (German)
http://frank-it-beratung.com/blog/2011/01/29/tutorial-ein-facebook-pinnwandeintrag-mit-visual-basic-oder-c-teil-2/
Its no problem with WinForms, because you can use System.Windows.Forms.Webbrowser control.
So in order to support this functionality in XNA Game Studio, do I need to embed a Winform Control in XNA? Or is there a better way?
I could embed the Winform in XNA by using this tutorial:
http://theinstructionlimit.com/how-to-properly-use-windows-forms-with-xna
You can try to use HttpWebRequest. You can google more info on how to use this method, essentially it is a direct connection to web page, the same way browser does it in background. Unfortunately it is not so easy to do and you might encounter additional facebook security barriers (as facebook does not want automated connections without web service).
There is also facebook sdk for windows store applications, but it should be possible to take some of it's code and use it for XNA.
So to answer your question - yes, there is definitely better ways to implement facebook login, but most likely much more complex than using Webbrowser control. Webbrowser should be last resort.

.NET Facebook API

I'm new in Facebook API's, so I have a question cause I'm in seriously trouble with API's and Facebook's security politics!
I'm developing a WinForm socket application and needing Facebook integration for add a event to user's wall and I must use .NET 2.0
When I'm googling, I've found many sdk (for example; Facebook C# SDK -this one supports only 3.5 and 4.0-, Facebook.NET -this one supports 2.0 but it isn't working-, Microsoft Facebook Development Toolkit, etc.) but there are no working one with .NET 2.0, cause Facebook's security protocols perpetually changing.
Can anybody advice me a sdk or way for this scenario?
PS: Sorry for my English, I'm not native speaker though I've deal as possible as clearly.
Thank you in advance,
Luindale Ainion.
I'm afraid (due to the fact that 3.5 has been around since 2007) that all the .Net SDKs available need 3.5 or later.
You will have to create your own solution using the WebClient class and a lot of patience.

Is anyone developing facebook apps on Grails

I have not seen much support for Grails to develop facebook apps.I was just wondering if people around are developing facebook apps on grails
Jozef Dransfield:
http://www.grassr.com/wordpress/?cat=8
I'm deep into Facebook integration from the social networking site ESMZone.com. I originally started using the Grails facebook-connect plugin and had good success at Facebook sign-on integration with the Grails jScurity plugin. However, as I attempted to implement other features, particularly Friend Invitations, I found that the facebook-connect plugin uses an old facebook SDK that was not compatible with the newer Javascript SDK. Documentation and examples using this newer SDK were readily available in searches unlike for the older API.
I switched to the Grails facebook-graph plugin and was able to work seemlessly with the Javascript API and get friend invitation working.
I have worked last weeks on a use-case concerning only server-side integration (no facebook connect style application). See some of my thoughts here : http://lbroudoux.wordpress.com/2011/02/23/integrating-facebook-from-a-grails-app/. Solution is actually implemented on Trailplans.com application.
I helped out a startup in San Francisco that are using Grails with facebook apps.
So yes, it's happening. There is even a grails plugin for facebook integration (at the time I'm writing this is woefully incomplete, but looks like it's having work done so check up on it again soon).