我在我的javascript代码中做了很多东西,用于在页面上张贴feed作为m`,但是我怎么才能通过一次点击就可以通过javascript获得权限。作为管理员使用javascript api的Facebook页面发布
这是我的代码。上面的脚本的
<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>
输出是
但我wan't张贴作为BeCrazzy.com
不Rajnish ..!
简单地说,我想以管理员的身份在页面上张贴feed。请帮帮我。 :)
可能重复的[如何发布到粉丝专页,而不是用户](http://facebook.stackoverflow.com/questions/8034753/how-to-post-to-facebook-fanpage-as-fanpage-非用户) – ifaour
我想我上面的答案仍然有效。 – ifaour
是的,你是对的,但我有点混乱.. 如何获得访问令牌使用JavaScript API ...抱歉,我不能得到任何解决方案。 – Rajnish