在facebook墙上发布一个事件
本文关键字:布一个 事件 facebook | 更新日期: 2023-09-27 18:11:26
我无法在墙上发布。它给了我一个弹出"OK Success",但在墙上找不到它
<script language="javascript" type="text/javascript">
FB.init({
appId: '18********',
status: true,
cookie: true,
xfbml: true
});
function wallpost(message, title, link, desc, picture, name, uid) {
var kime = '/' + uid + '/feed';
FB.api(kime, 'post', {
message: message,
name: 'Blabla..',
link: link,
picture: picture,
caption: title,
action_links: [{
text: 'BlablablanaFinally..',
href: 'http://thomasblog.somee.com/'
}],
description: desc
}, function (response) {
if (!response || response.error) {
alert(name + ' Success');
} else {
alert(name + ' Fail');
}
});
}
function sharex() {
wallpost('checking', "postingtowall", 'http://thomasblog.somee.com/', 'Hello World.', 'http://www.w3schools.com/images/lamp.gif', ' Ok ', 'me');
}
</script>
<p>
<a href="#" onclick="sharex();">Publish to Wall</a>
</p>
请帮我把这个发布在我的FB墙上。点击链接,弹出"Ok Success"对话框。但是我没有在我的墙上看到这个帖子。
谢谢太阳
这看起来不对:
if (!response || response.error) {
alert(name + ' Success');
} else {
alert(name + ' Fail');
}
同时,检查响应状态码和您得到的响应字符串。