ok i have a custom website and a self built chat system. what I need to know is how to make it show the link preview instead of the plain text link. similar to Skype or Facebook.
what I'm asking is how to use php and mysql and whatever else is needed to add this feature to my chat. I want it so that when someone sends a link in chat it comes up with a preview of the site and not the plain text link they put in
Facebook reads the link you provide and makes an HTTP request to fetch and parse the HTML of the page.
First it looks for Open Graph tags. If it does not find the given tags it fetches the standard HTML tags like
In any way, you will need to fetch the contents of the given link and parse them.