Johan
Johan

Reputation: 35194

deserialize graph.facebook.com JSON feed in c#

I am trying to get all facebook posts from a facebook group in ASP.NET through graph.facebook.com/id/feed.

I have successfully managed to get all data I need, but in JSON format. How do I deserialize this data so that I can use it?

Upvotes: 1

Views: 3844

Answers (1)

Richard
Richard

Reputation: 22016

If you are in c# 4.0 you can use the dynamic object to deserialize the graph object. see the c# facebook api here:

http://facebooksdk.codeplex.com/

http://ntotten.com/2010/09/dynamic-objects-and-the-facebook-c-sdk/

If you have a class to deserialize it into then something like NewtonSoft json library would help alot:

http://james.newtonking.com/pages/json-net.aspx

Upvotes: 1

Related Questions