簡體   English   中英

Facebook API返回錯誤代碼100

[英]Facebook api return error code 100

每次嘗試通過Facebook JS Sdk調用“發送”對話框時,都會出現此錯誤。

API錯誤代碼:100 API錯誤描述:無效的參數錯誤消息:'link'無效。

這是我的代碼。

在里面

     window.fbAsyncInit = function() {
            // init the FB JS SDK
            FB.init({
                appId      : '${sp.apiKey}', // App ID from the App Dashboard
                //       channelUrl : 'http://localhost:8084/facebook/callback', // Channel File for x-domain communication
                status     : true, // check the login status upon init?
                cookie     : true, // set sessions cookies to allow your server to access the session?
                xfbml      : true  // parse XFBML tags on this page?
            });

            // Additional initialization code such as adding Event Listeners goes here

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

發送對話框功能

 function sendFacebookMessage(id, jobid){

            FB.ui({
                method: 'send',
                name: 'Some text here.',
                to:id,
                link: 'www.some-url.com'

               //tomcat is running on port 8084
            });
        }  

我嘗試過http:// ...沒有它...

每次結果相同..“鏈接”無效。

有任何想法嗎?

文檔不是專門針對此文檔的 ,但是您可能無法在這種情況下指定localhost鏈接。 該URL僅對您在本地計算機上有效。 它不適合作為公共網站上的鏈接。

暫無
暫無

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

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