Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable / ignore rich link preview at server side

I have a link that on entering it (click/tap), is a confirmation to pay. The link is sent by sms to the user.

The problem starts when the link is being displayed as a rich preview url, that causes the link to be visited and the user will be considerd to confirm the payment.

Just so you can get a clue as for what is a rich preview (https://richpreview.com/). It happens in messaging services like WhatsApp and iMessage when they display the content of the link before you open it. It complies to the open graph protocol explained here: http://ogp.me/

The question is: how do I disable this rich perview from my end (server side) or how do I detect that this request is for rich preview so that I could ignore the payment confirmation?

One of the suggestions from Google searches was to simply locate the url link in the middle of the text, will it work in all cases?

I had the idea of creating a new page that will redirect (by script) on render to the actual payment confirmation page, is it possible or will the rich preview run this script as well?

Thanks

like image 386
Noyloy Avatar asked Aug 13 '17 09:08

Noyloy


1 Answers

Removing the http:// or https:// off the front of the link will cause Whatsapp to disable rich link previews.

enter image description here

like image 162
Stew-au Avatar answered Oct 25 '22 18:10

Stew-au