Click here to Skip to main content
15,892,199 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In the code , i m getting this error :
'System.Collections.Generic.KeyValuePair<string,object>' does not contain a definition for 'detail'

here is the code :
dynamic friendList = fb.Get("me/friends?fields=id,first_name,last_name,birthday,location,locale,age_range");
JsonObject mefriends = friendList;

foreach (dynamic friend in friendList)
{
foreach (dynamic detail in friend.detail ?? new[] {new{ id = new { id = string.Empty } }})
{
Response.Write("id: " + detail.id);

}

}



Please tell me why i m getting this error
Posted
Comments
Mehdi Gholam 28-Oct-14 2:34am    
Run your code in the debugger and see what you are getting and work with that.

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