title: Facebook C# SDK: An active access token must be used to query information about the current user
body: <p>My code is as follows:</p>
  
  <pre><code>FacebookClient client = new FacebookClient();
  
  client.AppId = appId;
  client.AppSecret = appSecret;
  
  dynamic result = client.Get("oauth/access_token", new
  {
      client_id = appId,
      client_secret = appSecret,
      grant_type = "client_credentials"
  });
  //client.AccessToken = "";
  
  var accessToken = result.access_token;
  client.AccessToken = accessToken;
  
  dynamic parameters = new ExpandoObject();
  parameters.client_id = appId;
  parameters.redirect_uri = "https://www.facebook.com/connect/login_success.html";
  parameters.response_type = "token";
  parameters.display = "popup";
  parameters.scope = "publish_actions";
  
  var login = client.GetLoginUrl(parameters);
  
  // AccessToken token;
  // var accessToken = client.AccessToken;
  
  dynamic result2 = client.Get("me");
  </code></pre>
  
  <p>But I get the error message: Facebook C# SDK: </p>
  
  <blockquote>
    <p>An active access token must be used to query information about the
    current user.</p>
  </blockquote>
  
  <p>Can someone help me where I'm going wrong with this please?</p>
  
  <p>Thanks!</p>