I need API which can provide me userid from facebook profile url. Eg: https://www.facebook.com/bhupinder.rajput.786 This is my profile url but when I hit this (https://graph.facebook.com/v2.5/bhupinder.singh.rajput) url in Graph API But I get error response
{ "error": { "message": "(#803) Cannot query users by their user name (bhupinder.rajput.786)", "type": "OAuthException", "code": 803, "fbtrace_id": "ChRSh/G8Q0J" } }
Then I try to scrap this url to get userid from Html source but when I hit this url I am getting response in Punjabi language.
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(URI);
HttpWebResponse requestp = (HttpWebResponse)request.GetResponse();
StreamReader streamReader = new StreamReader(requestp.GetResponseStream(), Encoding.ASCII);
SourceCode = streamReader.ReadToEnd();
SourceCode = HttpUtility.HtmlDecode(SourceCode);
requestp.Close();