2014-10-31 15 views
0

我想在用戶Facebook時間軸內發佈swf文件,但似乎我失去了一些東西。只有圖像顯示不是swf文件。 PLZ幫我做的撥錯在用戶Facebook時間軸不工作後發送swf

var obj = { 
      method: 'feed', 
      link: 'share-page.php', 
      picture: 'uploads/pics/a.png', 
      source: 'assets/swf/preloader.swf', 
      name : 'name', 
      caption: 'Caption', 
      description: 'Description' 
     }; 

     function callback(response) { 
      //some code here 
     } 

     FB.ui(obj, callback); 

我的共享文件page.php文件

<!DOCTYPE html> 
<html> 
<head> 
    <title>Title</title> 
<meta http-equiv="content-type" content="text/html; charset=utf-8"> 
<meta http-equiv="content-language" content="en"> 
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> 


<!-- Open grah tags for Facebook --> 
<meta property="og:title" content="Test video player" /> 
<meta property="og:description" content="A video player interface experiment." /> 
<meta property="og:type" content="video" /> 
<meta property="og:url" content="share-page.php"/> 
<meta property="og:image" content="uploads/pics/a.png"/> 
<meta property="og:video" content="assets/swf/preloader.swf" /> 
<meta property="og:video:secure_url" content="assets/swf/preloader.swf" /> <meta property="og:video:width" content="325" /> 
<meta property="og:video:height" content="180" /> 
<meta property="og:video:type" content="application/x-shockwave-flash" /> 
</html> 

回答

0

我希望看到你的問題遲早...

見我的回答this question並希望它會幫助你。

你的主要問題是你只是把文件夾名稱(資產和上傳),甚至沒有說他們來自哪個網站/服務器。你需要一個完整路徑文件:

<meta property="og:url" content="http://www.yoursite.com/share-page.php"/> 
<meta property="og:image" content="http://www.yoursite.com/uploads/pics/a.png" /> 
<meta property="og:video" content="http://www.yoursite.com/assets/swf/preloader.swf" /> 
<meta property="og:video:secure_url" content="HTTPS://www.yoursite.com/assets/swf/preloader.swf" /> 

基本上你應該能夠完全相同的路徑粘貼到新的瀏覽器選項卡,看到工作的結果,否則它不會工作在其他地方包括Facebook。您還需要提供「og:video」「og:video:secure_url」中提到的SWF文件,這些標記來自真正的HTTPS服務器,或者它不會在您的時間軸帖子內運行(而是會打開新的標籤鏈接到您的鏈接)。

Only image is display聽起來像一個幸運的錯誤!很可能是因爲在你的牆上發佈了一個鏈接到你的html頁面?恰恰相反,Facebook也會掃描顯示圖像的鏈接(它通常是隨機的,但我想爲您顯示的圖片是唯一可用於查找的圖片嗎?)

相關問題