Facebook Retrive Data using Graph API using c#

前端 未结 5 1472
北海茫月
北海茫月 2021-01-06 11:05

i have created desktop Facebook application using c# .net. i want to retrieve users message,post and chat history. which is convenient way to retrieve users all information.

5条回答
  •  一整个雨季
    2021-01-06 11:20

    Go to developer.facebook.com -> Tools & Support -> Select Graph API Explorer

    Here U get FQL Query, Access Token

    Then write code in C#.....

    var client = new FacebookClient();
    client.AccessToken = Your Access Token;
    
    //show user's profile picture
    dynamic me = client.Get("me?fields=picture");
    pictureBoxProfile.Load(me.picture.data.url);
    
    //show user's birthday
    me = client.Get("me/?fields=birthday");
    labelBirthday.Text = Convert.ToString(me.birthday);
    

提交回复
热议问题