Marco
Marco

Reputation: 2737

How to send a link to Facebook Messenger?

I've added some social share icons to my web page so i can share articles and/or send the article link to an app. For WhatsApp, I use it to send a link to someone. When i click on it, the app opens and asks me to select a user... I've did some research here and was able to make it work. I did it like this:

<a href="https://api.whatsapp.com/send?text=<?php echo urlencode($url); ?>">

I want to do the same for the messenger icon. I've did some research here, and i couldn't find anything. Can i do something similar for messenger? Can i use a link to send to messenger?

Upvotes: 0

Views: 1068

Answers (2)

alicele
alicele

Reputation: 1

It should be

<a href="//www.facebook.com/dialog/send?app_id=[your messenger api] &amp;link=<?php echo $url; ?>&amp;redirect_uri=<?php echo $url; ?>" target="_blank" rel="noopener noreferrer"></a>

Upvotes: 0

Andrew L
Andrew L

Reputation: 574

The closet you can get with Messenger is probably by implementing the Share Button

https://developers.facebook.com/docs/plugins/share-button/

Upvotes: 0

Related Questions