$facebook->api('/me/feed', 'post', array(
message => "Test" ,
link => "link",
name => "test",
picture => "test pic",
caption => "test",
description => "test"
));
我得到的错误是 未捕获OAuthException:(#100)抱歉,此帖子包含已阻止的网址
当我在localhost上运行时出现错误,只有当我将代码上传到服务器然后运行它时才会出现
答案 0 :(得分:0)
您是否在应用设置中启用了“Stream post URL security”迁移功能? 如果是,URL是否符合要求?
答案 1 :(得分:0)
答案 2 :(得分:0)
使用JS SDK https://developers.facebook.com/docs/reference/javascript/FB.api/
在使用OAUTH 进行身份验证之前 https://developers.facebook.com/blog/post/525/
var body = 'Reading JS SDK documentation';
FB.api('/me/feed', 'post', { message: body }, function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Post ID: ' + response.id);
}
});