Reputation: 33
I am using Facebook C# SDK 5.0.1 BETA and I am trying to use the following sample code that was posted on Codeplex:
// Using dynamic (.Net 4.0 only)
var app = new FacebookApp();
dynamic me = app.Get("me");
string firstName = me.first_name;
string lastName = me.last_name;
string email = me.email;
But I cannot get VS to recognize FacebookApp(). I downloaded the SDK today (Feb. 9th 2011) and made sure to unblock or unlock all the dlls. I am running the code off of my C drive and am running VS2010 as an admin. I am using VS 2010 with the 4.0 Framework (NOT client). If I dont use the above code snippet the project builds and runs but I cannot get the FB login button to display (that is 2nd issue). What is weird is that if I copy the URL (http://localhost:5000/Account/Login.aspx) into Firefox the login button displays and then I can log into Facebook and (I think) get authorized. Oh, I believe I do have the app setup correctly in Facebook and copied the AppId and AppSecrect into the config file. And I am using IE 8. Any suggestions? Thanks.
Upvotes: 1
Views: 786
Reputation: 11
I have the same problem when I get the binaries from the download section of the site with 5.0.2 and 5.0.3
I'm going to get the code and build it next to see if i find FacebookApp, but it is not there in the donwload versions.
Upvotes: 0
Reputation: 8932
Try to download it again. The current version is 5.0.3. Also, the documentation is in need of some updates. We have renamed the class FacebookApp to FacebookClient.
I have updated the documentation page: http://facebooksdk.codeplex.com/wikipage?title=Code%20Examples
Upvotes: 3