簡體   English   中英

Facebook類似按鈕未發布以供非FB應用程序開發使用

[英]Facebook Like Button Not Posting To Feed For Non FB Application Devs

我正在嘗試獲得一個簡單的Facebook像安裝程序以及視頻的動態鏈接。 下面的視頻功能(publishVidToFB())效果很好! 但是我無法讓這種地獄般的“贊”為我以外的任何人工作。

該應用程序不在沙盒模式下。 喜歡對我來說效果很好,但我的評論沒有收到。 對於此處沒有在應用程序上設置為“ Facebook開發人員”的其他開發人員-像點贊之類的消息源根本沒有出現。

FB調試器除了og:image標簽中的圖像大小外,沒有其他問題。

請查看下面的代碼,並提供幫助!

!DOCTYPE html

html

*head*

    *meta property="fb:app_id" content="app id is here" *
    *meta property="og:url" content="link back to the originating page is here... "*
    *meta property="og:site_name" content="site name code is here like 'INTERNALCODE'"*
    *meta property="og:image" content="web linkable image is here"*
    *meta property="og:description" content="description blah blah."*
    *meta property="og:type" content="company"*
    *meta property="og:title" content="blah blah blah"*
*/head*
*body*
    *div id="fb-root"**/div*
    *input type="button" value="Publish" onclick="publishVidToFB(); return false;" *
    *script*

    window.fbAsyncInit = function() {
            FB.init({
              appId      : 'my appid is here', // App ID
              status     : true, // check login status
              cookie     : true, // enable cookies to allow the server to access the session
              oauth      : true, // enable OAuth 2.0
              xfbml      : true  // parse XFBML
            });
        };

        (function(d, s, id) {
          var js, fjs = d.getElementsByTagName(s)[0];
          if (d.getElementById(id)) return;
          js = d.createElement(s); js.id = id; js.async = true;
          js.src = document.location.protocol + "//connect.facebook.net/en_US/all.js";
          fjs.parentNode.insertBefore(js, fjs);
        }(document, 'script', 'facebook-jssdk'));


        function publishVidToFB(){
            FB.ui({
               method: "stream.publish",
               user_message_prompt: "",
               message: "message",
               attachment: {
                  name: "Check out this cool video",
                  caption: "Video caption goes here etc etc etc",
                  href: "my href is here",
                  media:[{
                      "type": "image", 
                      "src": "image source is here",
                      "href": "myhref is here"
                    }]
                }
            });
        };

    */script*
    *div class="fb-like" data-href="href is here" data-send="false" data-width="450" data-show-faces="false"**/div*
*/body*

/ html

解決了。 Facebook已將我的所有測試都列入了該應用程序的黑名單。 等待了幾天,處理其他問題,我們就可以正常運行了。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM