我正在尝试在我朋友的时间线上发布消息。我正在使用以下代码。我也有正确的访问令牌,但我仍然无法发布。你可以看看这里是代码。
<script>
$(document).ready(function() {
var token = "<?php echo $_SESSION['access_token'];?>";
alert()token;
$.post(
"https://graph.facebook.com/<?php echo $sqlr['regidfriendsid']; ?>/feed",
{
picture: "http://my.com/hi.jpg",
link: "https://www.my.com/login.php?ref=owall",
privacy: '{value: "EVERYONE"}',
access_token: token,
name: 'Facebook Dialogs',
caption: 'Reference Documentation',
message: " Click to see more? "
}
);
});
</script>
我不知道为什么会收到此错误。
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104
}
}