Accessing Facebook C# SDK result Object using .NET 3.5 API?

后端 未结 3 1242
庸人自扰
庸人自扰 2021-01-15 02:06

Consider the following in .NET 3.5 (using the Bin\\Net35\\Facebook*.dll assemblies):

using Facebook;

var app = new FacebookApp();
var result = app.Get(\"me\         


        
3条回答
  •  佛祖请我去吃肉
    2021-01-15 03:03

    This code sample shows 3.5 usage, without needing the C# dynamic keyword:

    // Using IDictionary (.Net 3.5)
    var client = new FacebookClient();
    var me = (IDictionary)client.Get("me");
    string firstName = (string)me["first_name"];
    string lastName = (string)me["last_name"];
    string email = (string)me["email"];
    

提交回复
热议问题