1

I am trying to implement facebook app using C# SDKv6 (desktop app). But when I get the access token, I'm receiving this error (OAuthException - #1) Error validating client secret. .

This is a part of code :

dynamic result = fb.Get("oauth/access_token", new
            {
                client_id = appId,
                redirect_uri = redircct,
            });
gangadhars
  • 2,584
  • 7
  • 41
  • 68

1 Answers1

0

You missed the client_secret:

var oauthClient = new FacebookOAuthClient { AppId = "app_id", AppSecret = "app_secret", RedirectUri = new Uri("http://redirecturi.com") };

dynamic result = oauthClient.ExchangeCodeForAccessToken("code"); var accessToken = result.access_token;

Here is the reference

and a similar question

Community
  • 1
  • 1
Owen Cao
  • 7,955
  • 2
  • 27
  • 35