如何使用Ajax获取URL的标题,描述,image_url,如在Facebook上共享链接[关闭]

I am working on a project where if a user submits a URL, it should grab the title, images, and description from that URL and then give an option to change between images.

When submitted it should post those values.

Facebook, Google+ gets image, title, description from two known ways.

1) Most of the well-know websites gives og tags. It contains title, description, image http://ogp.me/

2) meta tags inside head tag of html will also be published by many sites. You can make use of that also.

For more explanation see the following link.

https://webapps.stackexchange.com/questions/6745/how-does-facebook-publisher-select-the-image-title-and-content-from-a-shared

I advise that you make a PHP page that parses the information and returns the data to you Ajax function. So to summarize, you'll want to google: "PHP Parsing HTML" and "Ajax PHP Retrieve Data".