Javascript 微信分享按钮
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26733653/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
WeChat share button
提问by dhok
I am trying to find out if it is possible to create a share button on a website that shares to WeChat.
我想知道是否可以在分享到微信的网站上创建一个分享按钮。
So just as you would with Twitter or Facebook to share a message or link back to the social network.
就像您使用 Twitter 或 Facebook 共享消息或链接回社交网络一样。
Has anyone managed to do this? Or has anyone confirmed that it is not possible?
有没有人设法做到这一点?或者有没有人证实这是不可能的?
thanks!
谢谢!
采纳答案by Sam
They publish an APK for Android and iOS that allows you to do this from another native app.
他们发布了适用于 Android 和 iOS 的 APK,允许您从另一个本机应用程序执行此操作。
As far as I'm aware, WeChat, like WhatsApp, does not support any web browser access so I don't think it's possible.
据我所知,微信和 WhatsApp 一样,不支持任何网络浏览器访问,所以我认为这是不可能的。
http://dev.wechat.com/wechatapi
http://dev.wechat.com/wechatapi
Perhaps somewhere in the API you can create a share button on a website that opens the Android or iOS apps, but I don't think any WeChat access is possible from the desktop.
也许在 API 的某个地方,您可以在打开 Android 或 iOS 应用程序的网站上创建一个共享按钮,但我认为从桌面访问微信是不可能的。
回答by Simon East
You can use the AddThisservice to embed a range of share buttons, including WeChat.
您可以使用AddThis服务嵌入一系列分享按钮,包括微信。
It doesn't seem to support opening the WeChat app with a pre-populated message (like when sharing to Twitter/Facebook) - probably because the WeChat app doesn't support this - but works around it in two ways:
它似乎不支持使用预先填充的消息打开微信应用程序(例如分享到 Twitter/Facebook 时)——可能是因为微信应用程序不支持这一点——但有两种方法可以解决这个问题:
On Desktop: clicking the share button displays a QR code which the user can scan using their mobile device
On Mobile: tapping the share button displays a share URL, a button to easily copy the URL, and another button to open the WeChat app. The user needs to still perform a couple of steps manually, but it's about the easiest it's gonna get.
在桌面上:单击共享按钮会显示一个二维码,用户可以使用移动设备扫描该二维码
在手机上:点击分享按钮会显示一个分享网址,一个按钮可以轻松复制网址,另一个按钮可以打开微信应用程序。用户仍然需要手动执行几个步骤,但这是最简单的。
Hope that helps.
希望有帮助。
回答by Roy
I have tried to implement the integration of WeChat on Meteor before. The questions are: 1. Did you have the correct package ID and signature? 2. Did you get approved from WeChat and get the WeChat App ID?
我之前尝试过在Meteor上实现微信的集成。问题是: 1. 您是否有正确的包裹 ID 和签名?2. 微信审核通过并拿到微信App ID了吗?
I follow the tutorials and get my app work here: http://blog.sanuker.com/?p=691Hope it helps! Good luck.
我遵循教程并在此处运行我的应用程序:http: //blog.sanuker.com/?p=691希望它有所帮助!祝你好运。
回答by Marco
The answer in this SO question should help you WeChat sharing, how to change re-share description and thumbail?. It refers to a Javascript API WeixinJSBidge http://mp.weixin.qq.com/qa/index.php?qa=3163with the documentation in Chinese but the code is still readable. Hope it helps you!
这个SO问题的答案应该可以帮助您微信分享,如何更改转发描述和缩略图?. 它指的是一个 Javascript API WeixinJSBidge http://mp.weixin.qq.com/qa/index.php?qa=3163带有中文文档但代码仍然可读。希望对你有帮助!

