在 facebook 共享页面中,它可以显示标题,包括 & 标记 ex:
url to share: http://myhome.com?q=hi&there
此页面的标题标签是
<title>hi&there</title>
但是,实际上,facebook 共享页面显示标题:hi 链接:http ://myhome.com?q=hi
我像下面这样调用 API。"http://www.facebook.com/sharer.php?u=" + encodeURIComponent(location.href) + "&t=" + encodeURIComponent(document.title) 我尝试使用 Open graph meta tag(og:title , og:url),但它没有帮助。
我在 facebook 开发人员的调试站点 (https://developers.facebook.com/tools/debug) 中检查了我的网址。但在调试站点中,它打印了正确的标题和链接(包括&符号)
谢谢。