如何与 google+、facebook 和 linkedin 共享整个链接?
我正在尝试使用来自 3 个社交媒体网站 Google+、Facebook 和 Linkedin 的“共享”链接。这些链接有效,但共享的 URL 错误。
例如,如果我的网址是:
http://webdomain.com/index.html# /test/testpage12312.html
它将分享这个:
http://webdomain.com/index.html #
有人知道为什么吗它忽略哈希之后的所有内容?谢谢。
以下是我正在使用的网址:
http://www.facebook.com/share.php?u=[URL]
http://www.linkedin.com/cws/share?url=[URL]
https://plusone.google.com/_/+1/confirm?hl=en&url=http%3A%2F%2F%20[URL]
I am trying to use the 'share' links from the 3 social media sites, Google+, Facebook, and Linkedin. The links are working, but they are sharing the wrong URL.
For example, if my url is:
http://webdomain.com/index.html#/test/testpage12312.html
It will share this:
http://webdomain.com/index.html#
Anyone know why it is ignoring everything after the hash? Thanks.
Here are the URL's I'm using:
http://www.facebook.com/share.php?u=[URL]
http://www.linkedin.com/cws/share?url=[URL]
https://plusone.google.com/_/+1/confirm?hl=en&url=http%3A%2F%2F%20[URL]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该对 URL 进行编码,使 # 字符变为 %23。
You should encode the URL so the # character will be %23.