我创建了一个应用程序。当一个用户接受此应用程序时,我已成功存储他/她的所有朋友列表。现在,如果我的用户愿意,我想发布以发布我的用户朋友墙。但问题是当我尝试发布然后显示此错误:
API Error Code: 240
API Error Description: Desktop applications cannot call this function for other users
Error Message: User needs to be admin of the page
但是不可能让我的应用程序中的所有用户都成为管理员。那么我应该怎么做才能发布呢?如果我需要使用accesstoken,那我该如何使用呢?或者这是一个错误,因为我只是一个桌面用户?
我张贴为:
function postonwall()
{
FB.init({ appId:'app_id', cookie:true, status:true, xfbml:true });
FB.ui({ method:'feed',from:'xxx' ,to:'yyy' , message: 'HI'}, function(response){
if (response && response.post_id)
{
alert('Post was published.');
}
else
{
alert('Post was not published.');
}
});
}
function warmup()
{
FB.init({ appId:'app_id', cookie:true, status:true, xfbml:true });
}
</script>
<a href="thispage.php" onclick="postonwall();"><div class="quote"><h2>post message</a>