asp.net mvc - How to check facebook profile url exists on facebook or not in aspnet mvc 4 c# -
i have used code return 200 status code
in case of invalid facebook url
i have validate 4 social media url twitter
,facebook
, linkedin
, xing
httpwebrequest req = (httpwebrequest)webrequest.create(url); req.allowautoredirect = false; httpwebresponse res = (httpwebresponse)req.getresponse(); if (res.statuscode == httpstatuscode.ok || res.statuscode == httpstatuscode.found) return true; else return false;
Comments
Post a Comment