Reputation: 31
I've just installed the facebook c# sdk, but when I'm tring to run the example (after all chenges done in the web.config) I'm receiving this error messgae:
'Facebook.JsonObject' does not contain a definition for 'name'
the code is:
Line 31: var fb = new FacebookClient(this.CurrentSession.AccessToken);
Line 32: dynamic myInfo = fb.Get("me");
Line 33: lblName.Text = myInfo.name;
Line 34: pnlHello.Visible = true;
the error is in line 33.
What I am doing wrong ?
I've found the sulotion:
line 33 should be -> lblName.Text = myInfo["name"];
Upvotes: 2
Views: 1367
Reputation: 1171
Got the reason:
Upvotes: 3