我已经在facebook上建立了一个分享链接,这样:
var points=0;
points = update_points(points)
document.getElementById("share-link").innerHTML='<a id="facebook-share" href="http://www.facebook.com/sharer.php?&p[url]=http://www.example.com/index.php?score='+points+'" target="_blank">Facebook</a>我使用javacript构建链接,因为共享的url取决于所获得的分数。
所以这在桌面浏览器(Safari,Firefox,Chrome,IE等)上运行得很好。问题只在移动设备上。这个链接根本不起作用。实际上,通过移动设备发送给共享者的链接类似于"http://"“。

发布于 2014-11-25 17:26:12
我通过这样更改url来解决这个问题:
document.getElementById("share-link").innerHTML='<a id="facebook-share" href="http://www.facebook.com/sharer.php?u=http://www.example.com/index.php?score='+points+'" target="_blank">Facebook</a>因此,问题似乎在于url中的"&purl“(在所有桌面浏览器上运行良好):
http://www.facebook.com/sharer.php?&p[url]=然后,您可能会更喜欢这种方法,它看起来不太好用:
http://www.facebook.com/sharer.php?u=https://stackoverflow.com/questions/25625453
复制相似问题