如何将其转换为在 .NET 3.5 中工作?它由于某种原因无法编译...抱怨“myInfo.data”缺少 .NET 4.0 中使用的 Microsoft CSharp 参考。
var auth = new CanvasAuthorizer { Perms = "user_about_me,friends_about_me" };
if (auth.Authorize())
{
var fb = new FacebookClient(auth.Session.AccessToken);
dynamic myInfo = fb.Get("/me/friends");
foreach (dynamic friend in myInfo.data )
{
Response.Write("Name: " + friend.name + "<br/>Facebook id: " + friend.id + "<br/><br/>");
}
}