开发者

Handling Nested JSON Object via Facebook C# SDK

Greetings and many thanks to the Stack Overflow community for all of the other awesome posts about the Facebook c# SDK. I have ran into a little challenge here and unfortunately I have not been able to find a previously posted solution.

How are you guys handling processing an nested JSON Object within a JSON response from the Facebook Open Graph API? For example, I am having some trouble getting to the nested venue JSON object that is returned when you retrieve a specific Facebook Event via the Open Graph: http://developers.facebook.com/docs/reference/api/event/

Here is some of the code that I am working with to provide more specific context:

var fbApp = new FacebookApp();
var auth = new CanvasAuthorizer(fbApp);

    if(auth.IsAuthorized())
    {
        //output the FB user's Event
        dynamic result = fbApp.Api("/" + EventID);

        txtEventDesc.Text = result.name;
        txtEventLoc.Text = result.location;
        txtEventInfo.Text = result.description;

        foreach (dynamic vi in VenueInfo.data)
      开发者_运维百科  {
            //txtStreet.Text =  vi.street;
        }

     }

    ...

So, how would you handle this embeded venue JSON object? Thanks in advance for taking the time to read my question and offer direction.


dynamic result = fbApp.Api("/" + EventID);    
dynamic street = result.venue.street;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜