[英]Whatsapp URL scheme does not allow query parametrs in iOS
I am not able to share any link which has query parameters like second one. 我无法共享任何具有第二个查询参数的链接。
whatsapp://send?abid=2&text=http://www.google.com
WORKS FINE whatsapp://send?abid=2&text=http://www.google.com
whatsapp://send?abid=2&text=http://www.google.com/?search=123
DOES NOT WORK whatsapp://send?abid=2&text=http://www.google.com/?search=123
You cannot use the ?
您不能使用
?
for sending any parameter after the first one. 用于在第一个参数之后发送任何参数。
To pass the value of the search as 123 try using &search=123
rather than ?search=123
. 要将搜索值传递为123,请尝试使用
&search=123
而不是?search=123
。
If the http://www.google.com/?search=123
is a whole string then you have to encode it as that contains "?" 如果
http://www.google.com/?search=123
是一个完整的字符串,则您必须对其进行编码,因为它包含“?” , "/" and ":". ,“ /”和“:”。
Your text value would be like this: 您的文本值将如下所示:
whatsapp://send?abid=2&text=http%3A%2F%2Fwww.google.com%2F%3Fsearch%3D123
which is the encoded string of the above. 这是上面的编码字符串。 Maybe this could solve your problem.
也许这可以解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.