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

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -