facebook post users wall

心不动则不痛 提交于 2020-01-16 13:24:07

问题


i have a@yahoo.com account and also created facebook account another two users have also facebook account by b@yahoo.com and c@yahoo.com per each.

b@yahoo.com and c@yahoo.com account holder pressed like button of the fan page owned by
a@yahoo.com holder.

now as a fan page [a@yahoo.com] but not as others, I like to post some message,attachment [to the wall of
the selected users + users who liked fan page]
among all of the users.

now I select only b@yahoo.com user.

the code is given below: I accepted manage_pages,offline_access,publish_stream permission.

$page_id = "YYYYYYYYYYYYYYYY";
$page_access_token = "";
$result = $facebook->api("/me/accounts");
foreach($result["data"] as $page) {
    if($page["id"] == $page_id) {
        $page_access_token = $page["access_token"];
        break;
    }
}
$data["access_token"] = $page_access_token;
$data["message"] = "aaaaaaaaaaaaaaaaa";
$data["name"] = "ttttttttttttt";
$data["caption"] = "cccccccccccccc";
$data["link"] = "http://www.facebook.com/pages/CCCCC/OOOOOsk=app_UUUUUUUUUUU";
$data["description"] = "aaaaaaaasdfsfsdf";
$data["picture"] = "http://cdn1.kingdomsofcamelot.com/fb/e2/src/img/fte/army_troop.png";

$post_id = $facebook->api("/$page_id/feed", "post", $data);

but the above code post the message,attachment to the wall of all users who liked the fan page,but I only write post to the specific users.

how can I achieve? or is there any possiblity to pass the target users id only?


回答1:


I'm not entirely sure i understood your problem.

Your code posts a post to the fan-page wall - not to the "wall of all users who liked the fan page".

As a fan page, you can not write to a user's wall, even if he is a fan of your fan-page.



来源:https://stackoverflow.com/questions/5764624/facebook-post-users-wall

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!