Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am trying to get get facebook posts to my c# app. I downloaded the source text and now i need to make a regex, that gets me the post itself. Any ideas, i will copy and example of the source text
Sorry for the large amount of text

{"data":[{"id":"105458566194298_494779370595547","from":{"id":"105458566194298","category":"Community","name":"Poker freeroll password"},"message":"$100 Nightly Freeroll Every Day on PH\n$1,000 No Deposit Freerolls Every Sunday\nMore Info: http:\/\/goo.gl\/zqPED (Ongame network)\n\nName: $100 Nightly Freeroll\nDate: Every Day \nHour: 20:30 CET\nPrize: 100$\nPassword: no need\n\nName: $1,000 No Deposit Freerolls\nDate: Every Sunday\nTime: 20:30 CET\nPrize: $1,000","privacy":{"value":""},"type":"status","status_type":"mobile_status_update","created_time":"2013-05-27T17:30:55+0000","updated_time":"2013-05-27T17:30:55+0000","likes":{"data":[{"name":"Jes Parm Nainggolan","id":"100002831121742"}],"count":1}},{"id":"105458566194298_494770977263053","from":{"id":"105458566194298","category":"Community","name":"Poker freeroll password"},"message":"\u20ac100 ,\u20ac200 ,\u20ac500 Redbet Freeroll on RBP\nMore Info: http:\/\/goo.gl\/RMMxY (Boss Media network)\n\nall tourneys under 500 players\n27\/05\/2013 20:00 CET \u20ac100 Redbet Freeroll\n28\/05\/2013 20:00 CET \u20ac200 Redbet Freeroll\n29\/05\/2013 20:00 CET \u20ac100 Redbet Freeroll\n30\/05\/2013 20:00 CET \u20ac500 Redbet Freeroll","privacy":{"value":""},"type":"status","status_type":"mobile_status_update","created_time":"2013-05-27T17:04:35+0000","updated_time":"2013-05-27T17:04:35+0000","likes":{"data":[{"name":"Giannis Moustakas","id":"100004166500780"}],"count":1}},{"id":"105458566194298_494741833932634","from":{"id":"105458566194298","category":"Community","name":"Poker freeroll password"},"message":"$200 and $50 Daily Freeroll on EuroP\nMore Info: http:\/\/goo.gl\/1m0SX\n\nName: $200 EuroPoker Daily Freeroll\nDate: Daily\nHour: 20:30 CET\nPrize: $200 (under 500 players)\nPassword: No Need\n\nName: $50 EuroPoker Daily Freeroll\nDate: Daily\nHour: 16:00 CET\nPrize: $50 (under 300 players)\nPassword: No Need","privacy":{"value":""},"type":"status","status_type":"mobile_status_update","created_time":"2013-05-27T15:38:42+0000","updated_time":"2013-05-27T15:38:42+0000","likes":{"data":[{"name":"Leo Valdovinos","id":"100002503556138"},{"name":"Elguja Pirtskhalava","id":"100000678075935"},{"name":"\u0420\u043e\u043c\u0430\u043d \u0421\u043a\u0438\u0434\u0430\u043d","id":"100003274770159"},{"name":"Chasmine Lazzara Lindefors","id":"741119488"}],"count":4}},{"id":"105458566194298_494730380600446","from":{"id":"105458566194298","category":"Community","name":"Poker freeroll password"},"message":"\u20ac50,000 Freeroll Festival (Poker by Microgaming)\nMore information here: http:\/\/goo.gl\/0mIFu\n02:30 CET - \u20ac50 Freeroll - Daily - Prize \u20ac50\n06:45 CET - \u20ac50 Freer
Posted
Comments
David_Wimbley 27-May-13 14:46pm    
What have you tried? Have you attempted anything? Are you stuck?

This is json, rather then trying to regex the crap out of that you should try using a json parser.

http://json.codeplex.com/
Andreas Gieriet 27-May-13 16:06pm    
Make this a solution so I can vote up ;-)
Cheers
Andi
David_Wimbley 27-May-13 16:33pm    
Done, Thanks :-)
Yuriy Loginov 27-May-13 15:56pm    
you should make that the answer. maybe add this link to it: http://www.json.org/

1 solution

This is json, rather then trying to regex the crap out of that you should try using a json parser.

http://json.codeplex.com/[^]


http://www.json.org/[^]
 
Share this answer
 
Comments
Andreas Gieriet 27-May-13 16:44pm    
As promised: my 5! ;-)
Cheers
Andi
Soloveikok 28-May-13 4:15am    
Okay, i downloaded JSON, but still stuck on this, never really worked with json before, what do i have to do?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900