Facebook C# SDK - .NET 3.5 & Dynamic objects

前端 未结 4 1172
难免孤独
难免孤独 2021-02-06 15:53

I have downloaded the Graph C# SDK for facebook, the examples are very helpful and easy to understand however i come unstuck when trying to use the dynamic object type as the re

4条回答
  •  轮回少年
    2021-02-06 16:18

    You might want to look at this article http://blog.prabir.me/post/Facebook-CSharp-SDK-Writing-your-first-Facebook-Application.aspx

    var fb = new FacebookClient("access_token");
    
    var result = (IDictionary)fb.Get("/me");
    var name = (string)result["name"];
    
    MessageBox.Show("Hi " + name);
    

    You will need to cast it to IDictionary

提交回复
热议问题