如何用ajax喜欢在Facebook上分享一个链接以获得标题,描述,URL的IMAGE_URL [英] how to get title, description, image_url of a url using ajax like share a link on facebook
问题描述
我工作的一个项目中,如果用户提交一个URL,它应该抓住标题,图像和描述从URL,然后给出一个选项图像之间进行切换。交房时就应该公布这些值。
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,谷歌获得的图像,标题,描述从两个已知的方法。
Facebook, Google+ gets image, title, description from two known ways.
1)大多数众所周知的网站给出了OG标签。它包含标题,描述,图像 http://ogp.me/
1) Most of the well-know websites gives og tags. It contains title, description, image http://ogp.me/
2)内的HTML头标记meta标签也被很多网站予以公布。你可以利用这也。
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.
<一个href="http://webapps.stackexchange.com/questions/6745/how-does-facebook-publisher-select-the-image-title-and-content-from-a-shared">http://webapps.stackexchange.com/questions/6745/how-does-facebook-publisher-select-the-image-title-and-content-from-a-shared
这篇关于如何用ajax喜欢在Facebook上分享一个链接以获得标题,描述,URL的IMAGE_URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!