我正在使用此站点页脚中的共享按钮。whatsapp按钮在除带有url http://gnr.richkid.co.il/he/catalog/a/item/?ItemID=etc的页面之外的所有页面中都能正常工作。
如果你将chrome中的用户代理改为像iphone,galaxy等那样的移动端,你可以在页脚看到按钮。
只是不要打开whatsapp。
A href代码:
<li>
<a class="wa_btn wa_btn_l" href="whatsapp://send?text=גלשתי באתר הגלריה - בית לאירועים באזור השרון: http://gnr.richkid.co.il/he/catalog/a/item/Default.aspx?ItemID=268" data-text="share" data-href="http://gnr.richkid.co.il/he/catalog/a/item/Default.aspx?ItemID=268" target="_top">
<i class="fa fa-whatsapp fa-2x"></i>
</a>
</li>有什么问题吗?我应该修复什么?
谢谢你,利伦。
发布于 2015-09-23 08:18:02
在href中使用字符串之前,您没有对其进行编码。
看看我在这个http://madole.github.io/blog/2015/06/18/mobile-browser-sharing-to-whatsapp-native-app/上的教程。
基本上,在将字符串放入href之前对其使用encodeURIComponent()。
https://stackoverflow.com/questions/30712859
复制相似问题