简体   繁体   中英

Clone Facebook wall posting via jQuery?

I would like to mimic Facebook's functionality where when you attach a link, it will read the meta data and image automatically:

在此处输入图片说明

在此处输入图片说明

Anyone know how to accomplish this interface functionality with jQuery?

It's not reading meta data of the image, it's reading actual data from the page. It does this, probably, with cURL:
http://php.net/manual/en/book.curl.php

tutorial:
http://phpsense.com/php/php-curl-functions.html

You can't do cross domain scripting with JavaScript so you will have to use a server side language such as PHP and then have PHP crawl the page and find the main content area of the description of the page... Hope that helps :\\ it's not really a front end type of thing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM