doutan3040 2017-02-01 14:41
浏览 88

Facebook Graph API访问令牌问题

I am trying to work with Facebook's Graph API v2.8 through the php-graph-sdk. My main objective right now is to get page ratings.

I setup a Facebook App which I'll call FB Ratings App and I can read ratings on my Facebook pages, but I ran into problems when I try to have other users get ratings through my app, FB Ratings App.

Here's a breakdown:

User A

  • Owns the Facebook App: FB Ratings App
  • Owns their Facebook Page: Sample Page A
  • Can see the Facebook Page data
  • The Access Token says it does not expire.

User B

  • Does NOT own the Facebook App: FB Ratings App
  • Owns their Facebook Page: Sample Page B
  • Can NOT see the Facebook Page data
  • The Access Token says it expires in 2 months

When I use the Access Token Debug Tool I see the same expiration time of 2 months for User B for the short lived access token as well as the long lived access token but the token string does change when I send the short token and ask for the long lived token.

Summary

  1. Users (except for myself) are not getting access tokens that do not expire. Is there a way to renew these without the user logging in again or should I be getting a token that doesn't expire?
  2. The same users that are getting access tokens of 2 months are not able to get Page Access Tokens for FB Pages that they own and created.

Here's a couple notes on the Facebook App that I created in the developers area. It is set to Public with the status, "Your app is currently live and available to the public." However, I have not submitted the app for approval. I wasn't sure if this was necessary or how to go about this. If I need to do this, does my project need to be finished for Facebook to review the code?

These issue maybe related or they could be separate. The Facebook API is by far the most confusing API that I've worked with.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 怎么用dlib库的算法识别小麦病虫害
    • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
    • ¥15 java写代码遇到问题,求帮助
    • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
    • ¥15 有了解d3和topogram.js库的吗?有偿请教
    • ¥100 任意维数的K均值聚类
    • ¥15 stamps做sbas-insar,时序沉降图怎么画
    • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
    • ¥15 关于#Java#的问题,如何解决?
    • ¥15 加热介质是液体,换热器壳侧导热系数和总的导热系数怎么算