Я получаю эту ошибку каждый раз, когда пытаюсь вызвать диалог отправки через Facebook JS Sdk.Facebook api return error code 100
API Код ошибки: 100 API Ошибка Описание: Неверный параметр Сообщение об ошибке: 'link' недействителен.
Вот мой код.
Init
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: // ... без него ...
каждый раз, результат тот же. . 'link' недействителен.
Любые идеи?
Вы правы, мой пример был плохим, поэтому я его отредактировал. У меня такая же проблема на нашем тестовом сервере. – brakebg