I\'m using Facebook SDK C# Library in Asp.Net 3.5 Application. When I\'m trying to compile the code below give me the errors. As I know dynamic type using in 4.0 framework. So i
dynamic is available in C# 4.0.
You have to convert your application to 4.0 version Change the referenced assemblies(System.Core) to 4.0 version.
If you don't want to use dynamic, you don't have to.
var client = new FacebookClient();
var me = client.Get("totten") as IDictionary<string, object>;
string firstName = (string)me["first_name"];
string lastName = me["last_name"].ToString();
This tutorial explains it more in depth
My project was already > 4.0. It was 4.5.2, in fact. I was experiencing this error. What I did to fix it:
I changed the project to 4.5.1.
I changed it back to 4.5.2.
Problem solved!
Thanks - hope this helps someone out there.
PS - not using facebook SDK, but this could help.