我在我的javascript代码中做了很多事情,以便在页面中以m`的形式发布提要,但我如何通过javascript获得许可,只需一次点击。
这是我的代码。
<body>
<div id='fb-root'></div>
<script src='http://connect.facebook.net/en_US/all.js'></script>
<p>
<a href="javascript:;" onclick='postToFeed(); return false;'>Post to Group</a>
</p>
<p id='msg'></p>
<script>
FB.init({appId: "apid", status: true, cookie: true});
function postToFeed() {
FB.api('/page_id/feed', 'post',
{
message : "It's awesome ...",
link : 'http://csslight.com',
picture : 'http://csslight.com/application/upload/WebsitePhoto/567-grafmiville.png',
name : 'Featured of the Day',
from: 'pageid',
description : 'CSS Light is a showcase for web design encouragement, submitted by web designers of all over the world. We simply accept the websites with high quality and professional touch.'
},
function(response) {
alert(JSON.stringify(response));
});
}
</script>
</body>以上脚本的输出为

但我不想以BeCrazzy.com的身份发布,而不是拉吉尼什!
简单地说,我想以管理员的身份在页面上发布馈送。请帮帮我。:)
发布于 2012-11-07 19:54:43
这里有一个教程,它确切地展示了如何做到这一点:
https://developers.facebook.com/docs/howtos/login/login-as-page/
您将不能使用Facebook Javascript SDK来进行使用页面访问令牌签名的API调用,您需要使用jQuery.ajax()之类的东西来执行此操作。
https://stackoverflow.com/questions/13268844
复制相似问题