My code is as follows:
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");
But I get the error message: Facebook C# SDK:
An active access token must be used to query information about the current user.
Can someone help me where I'm going wrong with this please?
Thanks!