I want to retrieve all page names the user is administering. Ive came across this post which is exactly what I want using graph api and not the FQL. Ive gotten the access token already but I cant debug using the below code. Anybody knows how do I achieve this?
//view all user pages
private void pageBtn_Click(object sender, EventArgs e)
{
FacebookAPI api = new Facebook.FacebookAPI(myToken.Default.token);
JSONObject pageData = api.Get("/me/account");//pulls all the pages
var data = pageData.Dictionary["name"];
List<JSONObject> pageList = data.Array.ToList<JSONObject>();
foreach (var page in pageList)
{
lbPages.Items.Add(page.Dictionary["name"].String);
}
}