5

I'm doing a chat app in python Django and I Want to implement Link preview while typing that ink in chat box. Anybody familiar with this please help.

Arjun A G
  • 98
  • 7

1 Answers1

4

You can use a Link preview API service - [1]: https://www.linkpreview.net/ Try this code .

$.ajax({
            url: "https://api.linkpreview.net",
            dataType: 'jsonp',
            data: {q: "message URL", key: 'your API key'},
            success: function (response) {
                let data=response;        
                console.log(data);
            }
        });