dongyi2534 2014-11-16 05:22
浏览 70

我如何在Facebook用户的墙上发帖?

I have some Facebook user in my database with their facebook id which is I have got after they login via my facebook app. Now I want to post their wall after a certain period using php.

I have got their user id using below code-

include_once "facebook.php";

$facebook = new Facebook(array(
  'appId'  => xxxxxxxxxxxxxxx,
  'secret' => xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx,
  'cookie' => true,
));

$user       = $facebook->getUser();

if ($user) {
  try {
    $user_profile = $facebook->api('/me');
  } catch (FacebookApiException $e) {
    print_r($e);
    $user = null;
  }
}

I have got their id from $user_profile variable.

I am using this scope to login "email,publish_actions"

Please give me some sample code if possible, I'm too much worry about this :(

Sorry for my poor English

  • 写回答

1条回答 默认 最新

  • dousi8559 2014-11-16 05:31
    关注

    As of 2nd October 2013 you can no longer post to another user's wall using the API:

    Removing the ability to post to friends' timelines via API

    We have found that posting content via API (stream.publish) on a friend's wall lead to a high incidence of user dissatisfaction (hiding content, blocking the app). After the migration period, posting content to friends' timelines via stream.publish will no longer be allowed. Please use the Feed Dialog for posting.

    Source: https://developers.facebook.com/docs/apps/migrations/completed-changes

    评论

报告相同问题?

悬赏问题

  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 关于大棚监测的pcb板设计
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)