duanpang5583 2012-02-27 12:59
浏览 19

用户离线时更新Facebook业务页面

I have offline_access and manage_pages permission but I keep getting all sorts of OAuth errors - with the code below I get

Fatal error: Uncaught OAuthException: Error validating access token: The session has been invalidated because the user has changed the password.

I saved both the user access token and the page access token in a database and then try to use it to update a page the user is admin of when the user is offline. I cannot seem to make this work:

$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 />
";

The commented out line above shows another thing I tried to no avail.

Can anybody help?

  • 写回答

1条回答 默认 最新

  • douxunzui1519 2012-05-14 09:33
    关注
    评论

报告相同问题?

悬赏问题

  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统