I am using Facebook SDK c# to make windows application. I try to load all page which I like it is successful.
The problem is when I press the load page button it load this data 1 more to become have duplicate, and get every page I like it 2 times my code
private void button2_Click(object sender, EventArgs e)
{
string[,] friends;
FacebookClient fb = new FacebookClient(AppSettings.Default.AccessToken);
dynamic Grouplist = fb.Get("/me/likes");
int count = (int)Grouplist.data.Count;
friends = new string[count, 1];
for (int i = 0; i < count; i++)
{
listView3.Items.Add(Grouplist.data[i].name);
}
}
listView3.Items.Clear();
for (int i = 0; i < count; i++)
{
listView3.Items.Add(Grouplist.data[i].name);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.