dongrenzheng1619 2015-01-15 20:30
浏览 38

Facebook图表 - 如何通过PHP SDK重新生成用户访问令牌

I'm trying to search Facebook for relevant groups depending on keywords. I'm using to graph explorer and it works fine.

search?&type=group&q=php&access_token=MY_TOKEN

Is there anyway I can perform this search from my server using a (my) user access token and keep renewing the access token through the PHP SDK?

From looking at the documentation it looks like I have to use a user access token that requires a login and expires after a set amount of time?

  • 写回答

1条回答 默认 最新

  • dounie0889 2015-01-16 02:00
    关注

    As the facebook docs here say . you will have to extend the token when it expires . i guess its a security measure from facebook to ensure that the user is still active with the app .

    Even the long-lived access token will eventually expire. At any point, you can generate a new long-lived token by sending the person back to the login flow used by your web app - note that the person will not actually need to login again, they have already authorized your app, so they will immediately redirect back to your app from the login flow with a refreshed token

    A long lived access token is valid for 60 days . All you need is to supply the new access token once in a while to your php script . ( assuming you are just using your token for performing the search )

    评论

报告相同问题?

悬赏问题

  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)