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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.