【问题标题】:How do I post on Facebook User's wall?如何在 Facebook 用户墙上发帖?
【发布时间】:2014-11-16 05:22:55
【问题描述】:

我的数据库中有一些 Facebook 用户,他们的 facebook id 是他们通过我的 facebook 应用程序登录后获得的。现在我想在一段时间后使用 php 发布他们的墙。

我已经使用下面的代码获取了他们的用户 ID-

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;
  }
}

我从 $user_profile 变量中获得了他们的 ID。

我正在使用此范围登录 "email,publish_actions"

如果可能的话,请给我一些示例代码,我太担心了:(

对不起我的英语不好

【问题讨论】:

  • 不允许在用户墙上发帖。用户需要触发帖子。

标签: php facebook facebook-graph-api


【解决方案1】:

从 2013 年 10 月 2 日起,您将无法再使用 API 在其他用户的墙上发帖:

移除通过 API 发布到朋友时间线的功能

我们发现通过 API (stream.publish) 在 朋友墙导致用户不满高发(隐藏 内容,阻止应用程序)。迁移期结束后,发布 将不再通过 stream.publish 将内容添加到朋友的时间线 允许。请使用Feed Dialog 发帖。

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-03-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-07-25
    相关资源
    最近更新 更多