2012-03-15 37 views
0

我有一個facebook應用程序通過iframe顯示在我的網頁上。我在頁面上添加了下面的代碼來生成相似和註釋塊。Facebook的按鈕發佈錯誤的網址到牆

<div class="my_page_footer"> 
<script src="https://connect.facebook.net/en_US/all.js"></script> 
    <div class="my_page_likes"> 
    <fb:like href="<?=$canvas_url;?>" show_faces="true" width="570" font="verdana"></fb:like> 
    </div> 
    <div id="fb-root"></div> 
    <div class="my_page_comments"> 
    <fb:comments href="<?=$canvas_url;?>" num_posts="5" width="570"></fb:comments> 
    </div> 
</div> 

其中畫布網址是我的應用程序的iframe src。 然而,當任何人點擊像iframe src url張貼在他們的牆上,而不是應用程序的名稱或應用程序的鏈接

任何想法?

  • 尼爾

回答

0

Facebook的計算出什麼來顯示使用的Open Graph頭的URL。例如:

<meta property="og:title" content="..." /> 
<meta property="og:url" content="..." /> 
<meta property="og:image" content=""..." /> 

可以使用OG debugger tool搞清楚,如果你的頭是設置正確。

+0

我可以覆蓋這些嗎?在我的應用中設置這些元標記? – Neil 2012-03-16 15:42:53

+0

你應該做的是,而不是使用你的$ canvas_url URL(http://apps.facebook.com/my-app)你應該做http://www.my-app.com – Art 2012-03-16 22:02:21