Get friends lists from facebook in C# (REST service) -


i creating 1 rest service. in want friends facebook. used below code :

        string myaccesstoken = "app id";         facebookclient client = new facebookclient(myaccesstoken);          var friendlistdata = client.get("/me/friends");         jobject friendlistjson = jobject.parse(friendlistdata.tostring());          list<fbuser> fbusers = new list<fbuser>();         foreach (var friend in friendlistjson["data"].children())         {             fbuser fbuser = new fbuser();             fbuser.id = friend["id"].tostring().replace("\"", "");             fbuser.name = friend["name"].tostring().replace("\"", "");             fbusers.add(fbuser);         } 

here, passing accesstoken app id. think, there problem it. so, should pass there ?

thanks in advance.

this may seem dumb response have out breakpoint onto jobject see if getting kind of response fb?


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -