Test if a link is Opengraph friendly -
i have website extract opengraph metadatas links in database.. , have create verify code check if link user sending through submit box website database opengraph friendly. need kind of test in link , see if has @ least meta property="og:image" on source code, , avoid submission of links not work properly. i’m using recaptcha avoid spammers , thinking use same verify code of recaptcha opengraph test. have idea of how can this?
i need kind of test in link , see if has @ least meta property="og:image" on source code
well, should obvious means reading source code of page, , meta element.
wether want read first x bytes of ressource (that’s fb afaik), , perform string/regexp search, or if want use html parser on , in dom, that’s decision make … first maybe little more error-prone, while second means more complexity.
Comments
Post a Comment