Jump to content

Facebook link effect


TheDudeAp

Recommended Posts

Hey,  I was wondering how when you post a link on someones wall in facebook it can take that, find a picture(A good one) of the site, Title, and some information from the site and it can do this for most any site.

 

Do they somehow bring the source in and look at the <Title> tag and whatever else?

 

For example if you post a youtube link it brings the video, title, and basic description right into facebook on someones wall or message.

 

Thanks in advance for a response!

Dan

Link to comment
https://forums.phpfreaks.com/topic/155868-facebook-link-effect/
Share on other sites

Basically it would require some prior regular expression knowledge.  Check if its a youtube link with regex.

 

Then if true, take the id from the link, and grab the data straight from the youtube page itself and parse the corresponding information that you are wanting to show.

 

Pretty simple.  Just regular expressions, file_get_contents OR cURL.

Link to comment
https://forums.phpfreaks.com/topic/155868-facebook-link-effect/#findComment-820428
Share on other sites

He wants to actually embed the code straight into the page, not a snapshot, if he wants a snapshot then your reply is correct.

 

I guess my reply was for only part of his question:

find a picture(A good one) of the site

 

For the other part's it is simply using curl and probably preg_match to find the data to construct a description and title etc.

Link to comment
https://forums.phpfreaks.com/topic/155868-facebook-link-effect/#findComment-820452
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.