开发者

Can any one help me with getting friends list

开发者 https://www.devze.com 2023-03-11 08:13 出处:网络
I use this code to get all users and add a control i created call UserIcon for each one var fb = new FacebookClient( global::Bolts_WB.Properties.Settings.Default.acess_token);

I use this code to get all users and add a control i created call UserIcon for each one

        var fb = new FacebookClient( global::Bolts_WB.Properties.Settings.Default.acess_token);
        dynamic myInfo = fb.Get("/me/friends");
        foreach (dynamic friend in myInfo.data)
        {
            UserIcon x = new UserIcon(friend.name, friend.id);
            x.Size = new Size(53, 53);
        开发者_开发问答    x.CreateControl();
            x.Dock = DockStyle.Top;
            x.Visible = true;
         facebooklistfriends.Controls.Add(x);
    } 

when i debug it sends an error like this :

(OAuthException) Invalid access token signature. it is thrown in dynamic myInfo = fb.Get("/me/friends");

what causes it and how can it be solved?

I am pretty sure that my access token is right because it works with my posting method

My Permissions are these

   private string[] _extendedPermissions = new[] { "user_about_me", "publish_stream", "friends_about_me", "read_mailbox",  };


If you believe that the access token is correct, then try entering the URL directly in Firefox browser.

https://graph.facebook.com/me/friends?access_token=ADD-ACCESS-TOKEN

If this gives you the proper response, then your access token is valid and the problem is else where.

0

精彩评论

暂无评论...
验证码 换一张
取 消