我嘗試複製以下網站上的共享按鈕(它位於底部):複製一個Facebook共享彈出框
警告!本網站上的圖片可能非常混亂! http://www.bbc.co.uk/news/special/2014/newsspec_8702/index.html
如果我從那裏點擊它看起來像這樣:
如果我複製代碼:
<a href="https://www.facebook.com/dialog/feed?app_id=58567469885&redirect_uri=http%3A%2F%2Fwww.bbc.co.uk%2Fmodules%2Fsharetools%2Fcallback%3Fst_cb%3Dfacebook%23state%3Dfeed&display=popup&link=http://www.bbc.co.uk/news/magazine-29205427&name=Voices%20from%20the%20mall%20-%20remembering%20the%20first%20terrifying%20hours%20of%20the%20Westgate%20attack%20a%20year%20ago%2C%20via%20%40BBCNewsMagazine&description=Shared%20via%20BBC%20News&picture=http://newsimg.bbc.co.uk/media/images/67373000/jpg/_67373987_09f1654a-e583-4b5f-bfc4-f05850c6d3ce.jpg" target="_blank"><span>Facebook</span>
</a>
並把它在一個HTML或的jsfiddle:
https://jsfiddle.net/clankill3r/6oufc1pL/
然後,而不是一個彈出窗口,我得到一個新的窗口和圖像我s消失了:
這是爲什麼?我該如何改變這種行爲。
編輯:
如果我點擊原網站的彈出窗口中的鏈接更改爲這一些奇怪的原因:
https://www.facebook.com/dialog/feed?app_id=58567469885&redirect_uri=http%3A%2F%2Fwww.bbc.co.uk%2Fmodules%2Fsharetools%2Fcallback%3Fst_cb%3Dfacebook%23state%3Dfeed&display=popup&link=www.bbc.co.uk/news/magazine-29205427&name=Voices%20from%20the%20mall%20-%20remembering%20the%20first%20terrifying%20hours%20of%20the%20Westgate%20attack%20a%20year%20ago%2C%20via%20%40BBCNewsMagazine&description=Shared%20via%20BBC%20News%20Magazine&picture=http://www.bbc.co.uk/news/special/2014/newsspec_8702/static/img/fb.png
是的,但奇怪的是,我得到了不同的圖像:) 但至少它更好。仍然想知道爲什麼沒有彈出。 – clankill3r 2015-04-02 10:23:22
我知道Facebook緩存og:image標籤,這可能是爲什麼'圖片='不工作?也許從https://developers.facebook.com/tools/debug強制一些新的信息。 – 2015-04-02 10:37:34
關於作爲彈出窗口打開,請使用下面的一些Javascript: 'Share this' – 2015-04-02 10:41:23