dongpin2969 2013-10-16 08:20
浏览 55
已采纳

将数字粉丝页面ID转换为String粉丝页面ID \粉丝页面名称

This question is partially addressed here, but I cannot use this answer, since my user doesn't necessarily like this specific fan page.

The issue: I have numeric fan page IDs saved at my DB, I would like to provide my user with a link directly to my app page at a certain fan page.

The problem: https://www.facebook.com/[NUMERIC_ID]/app_[MY_APP_ID] Doesn't seem to work.
But https://www.facebook.com/[FAN_PAGE_NAME]/app_[MY_APP_ID] does work.

Thus I need a way to convert the numeric fan page id to the actual fan page name(maybe CURLing the page?).

I would like to do it either through the PHP SDK, the graph API, or FQL. The language I need to implement this in is PHP.

EDIT:

I need a way of doing this with no auth token, or with the auth token of my app, since the mentioned page is a public page, that doesn't require Facebook authentication

  • 写回答

1条回答 默认 最新

  • douluan5738 2013-10-16 08:49
    关注

    I think you can find your answer here https://developers.facebook.com/docs/reference/api/page/

    To read a Page you need:

    • an app or user access token for public and non-demographically restricted pages
    • a user access_token for restricted pages that the current user is able to view (no special permissions required)

    A Graph API request such as /[PAGE_ID]?fields=id,name,link will return (where PAGE_ID is 19292868552)

    {
      "id": "19292868552", 
      "link": "http://www.facebook.com/FacebookDevelopers", 
      "name": "Facebook Developers"
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

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