使用 Facebook 的实时更新接收实时页面提要更新 api
Receiving real-time Page feed update using facebook's real time update api
所以我想在特定页面上有新 post 时收到实时通知更新。为此,我参考了 Facebook 的实时更新 api 指南 (https://developers.facebook.com/docs/graph-api/real-time-updates/v2.3)
我已经为我的应用订阅了页面 Feed 更新:
我的应用有 "manage_pages" 权限:
<fb:login-button scope="manage_pages" onlogin="checkLoginState();">
页面管理员使用我的应用程序登录后,我应该会收到 pafe 提要更新,对吗?但是没用。
有些人提到我必须向此 url (https://graph.facebook.com/PAGEID/tabs?app_id=APPID&method=POST&access_token=PAGE_ACCESS_TOKEN) 发出 post 请求,以便我从该特定页面获取更新。
我也试过这个,它给出了正确的响应,但是当页面生成新的 posts 时我仍然没有收到任何更新。
如果有人做到了这一点,请 post 详细的操作方法。我真的很感激。 Facebook 的文档不好。
谢谢
使用新的subscribed_apps endpoint - no need to add the App to a Page for that one: https://developers.facebook.com/docs/graph-api/reference/v2.3/page/subscribed_apps
为了使实时更新工作,您需要使用 subscribed_apps and the subscriptions 端点。
所以我想在特定页面上有新 post 时收到实时通知更新。为此,我参考了 Facebook 的实时更新 api 指南 (https://developers.facebook.com/docs/graph-api/real-time-updates/v2.3)
我已经为我的应用订阅了页面 Feed 更新:
我的应用有 "manage_pages" 权限:
<fb:login-button scope="manage_pages" onlogin="checkLoginState();">
页面管理员使用我的应用程序登录后,我应该会收到 pafe 提要更新,对吗?但是没用。
有些人提到我必须向此 url (https://graph.facebook.com/PAGEID/tabs?app_id=APPID&method=POST&access_token=PAGE_ACCESS_TOKEN) 发出 post 请求,以便我从该特定页面获取更新。
我也试过这个,它给出了正确的响应,但是当页面生成新的 posts 时我仍然没有收到任何更新。
如果有人做到了这一点,请 post 详细的操作方法。我真的很感激。 Facebook 的文档不好。
谢谢
使用新的subscribed_apps endpoint - no need to add the App to a Page for that one: https://developers.facebook.com/docs/graph-api/reference/v2.3/page/subscribed_apps
为了使实时更新工作,您需要使用 subscribed_apps and the subscriptions 端点。