I'm trying to make HttpWebRequest for the facebook url using a WCF service. It gives a bad request error in WCF:
https://graph.facebook.com/search?type=user&access_token=" + Convert.ToString(ConfigurationManager.AppSettings["Facebook_Access_Token1"]) + "&q=" + searchString + "&offset=0&limit=1000&fields=name,link,gender,languages,location,address,education,work,picture
Complete url for reference:
https://graph.facebook.com/search?type=user&access_token=<access_token>&q=f%3DPulkit&offset=0&limit=1000&fields=name,link,gender,languages,location,address,education,work,picture
If I directly try to access this url through browser it gives the below error msg:
{
"error": {
"message": "Error validating access token: Session has expired on Sunday, 22-Feb-15 23:22:13 PST. The current time is Monday, 02-Mar-15 04:47:31 PST.",
"type": "OAuthException",
"code": 190,
"error_subcode": 463
}
}
This code worked fine earlier as a Java Rest service. But now it does not work this way. Any pointers would be helpful. Thanks.