【问题标题】:Updating Facebook business page when user is offline用户离线时更新 Facebook 业务页面
【发布时间】:2012-03-16 22:47:40
【问题描述】:

我有 offline_accessmanage_pages 权限,但我不断收到各种 OAuth 错误 - 使用下面的代码我得到了

致命错误:未捕获的 OAuthException:验证访问令牌时出错: 会话已失效,因为用户已更改 密码。

我将用户访问令牌和页面访问令牌都保存在数据库中,然后尝试使用它来更新用户离线时管理的页面。我似乎无法完成这项工作:

$access_token = User token got when user was logged in;
$news_token = Page token got when user was logged in;

// $accounts_url = "https://graph.facebook.com/me/accounts?" . $access_token;

            $page_info = $facebook->api("/$news_page?fields=access_token");
                     $args = array(
                                  'access_token'  => $news_token,
                                  'message'       => $u,
                                  'link'          => $news_url,
                                  'description'   => $u,
                                  'name'          => $news_title,
                                  'picture'       => $image
                                  );

                  $post_id = $facebook->api("/$page_id/feed","post",$args);
                  echo $news_source."(Offline): ".$u."<br />\n";

上面注释掉的行显示了我尝试无济于事的另一件事。

有人可以帮忙吗?

【问题讨论】:

    标签: php facebook oauth facebook-access-token


    【解决方案1】:

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-03-19
      • 2015-04-05
      • 1970-01-01
      • 2013-06-01
      • 2013-11-21
      相关资源
      最近更新 更多