-1
大家好,我 與分享在Facebook上的一個帖子,用料方法的問題。我在這裏看到了其他的問題,但很老舊,同時FB改變了很多東西,不贊成使用等等。所以,我的問題是彈出窗口沒有從鏈接中獲取正確的圖片和信息。這就是我現在做: - 共享頁面(的index.php)
<meta property="og:url" content="http://www.example.com/test/index.php" />
<meta property="og:type" content="website" />
<meta property="og:title" content="My title" />
<meta property="og:description" content="Some description" />
<meta property="og:image" content="http://www.example.com/test/images/fb_952_498.jpg" />
在其他頁面
的頭:
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '123456789',
xfbml : false,
version : 'v2.10'
});
};
(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 = "//connect.facebook.net/ro_RO/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
<script type="text/javascript">
function Post_Imagine(){
FB.ui({
method: 'feed',
link: 'http://www.example.com/test/index.php',
caption: 'Some text',
}, function(response){});
}
Facebook調試工具說什麼?如果你不能自己解決這個問題,那麼給我們一個實際的例子URL,我們可以檢查這個 - 上面的虛擬值並不是真的有用。 – CBroe