Johan
Johan

Reputation: 293

facebook graph api: /me OAuthException (c#)

var json = new WebClient().DownloadString("https://graph.facebook.com/me?access_token=" + app.AccessToken);

My accesstoken works when im fetching other stuff from the graph api. But when i try to get info about the current user i get the errormessage:

{
"error": {
  "type": "OAuthException",
  "message": "An active access token must be used to query information about the current user."
}
}

The user has connected to my app on the page. Did i miss something? All i need is his userID. Thanks

Upvotes: 2

Views: 1208

Answers (1)

Douglas Purdy
Douglas Purdy

Reputation: 1009

access token expire. you need to ensure that the access token you have is valid. see the https://developers.facebook.com/blog/post/500.

Upvotes: 2

Related Questions