我有Facebook社交分享按鈕的問題。彈出窗口顯示后單擊分享按鈕后,它不會顯示og:image標(biāo)簽中提供的圖像,也不顯示og:title和og:description標(biāo)簽中的標(biāo)題和說明。這是我在localhost:3000上提供的項目的問題。我還嘗試從Facebook網(wǎng)站(https://developers.facebook.com/docs/plugins/share-button/)復(fù)制并粘貼代碼,并在瀏覽器中運行單獨的index.html,但即使這樣也行不通正如預(yù)期的那樣(僅顯示網(wǎng)站的網(wǎng)址)那么即使使用官方代碼也有什么問題,我該如何解決它,所以我的圖片,描述和標(biāo)題會顯示在彈出窗口中?這是來自Facebook Doc的代碼<html><head> <title>Your Website Title</title> <!-- You can use Open Graph tags to customize link previews. Learn more: https://developers.facebook.com/docs/sharing/webmasters --> <meta property="og:url" content="https://google.pl" /> <meta property="og:type" content="website" /> <meta property="og:title" content="Your Website Title" /> <meta property="og:description" content="Your description" /> <meta property="og:image" content="http://javascript.info/article/call-apply-decorators/decorator-makecaching-wrapper.png" /></head><body> <!-- Load Facebook SDK for JavaScript --> <div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script> <!-- Your share button code --> <div class="fb-share-button" data-href="https://google.pl" data-layout="button_count"> </div></body></html>
Facebook分享按鈕不顯示localhost上的og標(biāo)簽的圖像等
胡說叔叔
2019-04-09 13:15:21