How to implement facebook and g+ like link previews with client side languages
-
28-10-2019 - |
Вопрос
What the real coding involved in making these link previews..means which languages? How can we extract meta tag information in a website. I know these all requires AJAX but I want a bit more clarification to make it for my website !!!
And one more important doubt is can I do it by just using client side languages like extracting meta tag dynamically by javascript function?
Решение
I asked this question before, and got a good answer. Is there open-source code for making 'link preview' text and icons, like in facebook?
The solution there used AJAX and PHP - it links to this site: http://www.99points.info/2010/07/facebook-like-extracting-url-data-with-jquery-ajax-php/
Другие советы
See Is there open-source code for making 'link preview' text and icons, like in facebook?
As for the second part of the question: No, you can't because of the same origin policy.
Make a redirect page. Past the url into facebook and let it cache. Change redirect before you press post.