2014-07-16 33 views
2

我想顯示使用URL重定向共享對話框如下所述:https://developers.facebook.com/docs/sharing/reference/share-dialogFacebook共享對話與URL重定向不工作

他們提供的示例如下:https://www.facebook.com/dialog/share?app_id=145634995501895&display=popup&href=https%3A%2F%2Fdevelopers.facebook.com%2Fdocs%2F&redirect_uri=https://developers.facebook.com/tools/explorer

我試圖實現同樣使用自定義頁面我創建(與OG meta標籤),這裏是代碼:

<!DOCTYPE html> 
<html> 
<head> 
    <title>Test</title> 
    <meta name="description" content="Page description. No longer than 155 characters." /> 

    <!-- Twitter Card data --> 
    <meta name="twitter:card" value="summary"> 

    <!-- Open Graph data --> 
    <meta property="fb:app_id" content="762471050442760" /> 
    <meta property="og:site_name" content="Facebook Developers" /> 
    <meta property="og:title" content="Documentation for building software with Facebook - APIs, SDKs and Services" /> 
    <meta property="og:type" content="article" /> 
    <meta property="og:url" content="https://developers.facebook.com/docs/" /> 
    <meta property="og:image" content="https://fbstatic-a.akamaihd.net/rsrc.php/v2/y6/r/YQEGe6GxI_M.png" /> 
    <meta property="og:locale" content="en_US" /> 
    <meta property="og:description" content="Learn how to integrate with Facebook&#039;s APIs and developer tools to drive growth and engagement to your app, website or content." /> 
</head> 

<body> 
</body> 
</html> 

該頁儲存在這個位置(這裏假的位置) - > www.mysite.com/test.html

現在我嘗試使用以下鏈接共享:https://www.facebook.com/dialog/share?app_id=MY_APP_ID&display=popup&href=www.mysite.com/test.html&redirect_uri=www.mysite.com

但是我沒有得到與他們提供的示例相同的結果。相反,我從另一個網站上獲得一些圖片和描述(根本不是我用meta標籤創建的圖片和描述)。

我該如何解決並自定義我的共享對話框?

謝謝

+0

您在說您的og:url是https://developers.facebook.com/docs/。改用你的網址,它會更好 – WizKid

回答