如何在 WhatsApp API URL 中添加图像参数

问题描述 投票:0回答:2

基本上,当用户单击带有 WhatsApp 图标的聊天时,我想从我的网站向 WhatsApp 发送图像和一些文本

所以我想将用户从我的网站重定向到我的 WhatsApp 聊天! 我知道我们可以向 WhatsApp API URL 添加一个文本参数,如下所示:

https://api.whatsapp.com/send?phone=123456789&text=this is a test

但事实是我想在 URL 中添加像图像参数和文本参数,例如这样:

https://api.whatsapp.com/send?phone=123456789&text=this is a test&img=[my-image]
image api url parameters whatsapp
2个回答
0
投票

根据我的经验,你无法使用普通的 Whatsapp api 来做到这一点。您可以使用此链接结构后面的文本参数发送文本或图像: https://api.whatsapp.com/send?phone=&text=

Phone_number - 是带有国家/地区代码的电话号码 文本 - 可以是粗文本或图像链接文本。

根据图像名称,您可能需要在将图像添加到链接之前对图像进行 url_encode。


-2
投票

source_url,但您的文本不会显示(是文本或图像)

© www.soinside.com 2019 - 2024. All rights reserved.