【问题标题】:Facebook Graph API - Get user profile from conversationsFacebook Graph API - 从对话中获取用户资料
【发布时间】:2018-01-30 08:14:31
【问题描述】:

通过使用 Facebook Graph API,我可以获取用户和我的页面之间的对话。返回的对话之一如下所示:

{
  "message": "message content",
  "from": {
    "name": "My Page's Name",
    "email": "198301820627381@facebook.com",
    "id": "198301820627381",
  },
  "to": {
    "data": [
      {
        "name": "John Doe",
        "email": "396169264164870@facebook.com",
        "id": "396169264164870",
      }
    ]
  },
  "id": "m_mid.$cAADurJ0X8UhnJ3tfxVg9jYXJW5fp"
}

我看到我得到了用户的id 字段。如何根据此字段获取此用户的个人资料(名字、姓氏、个人资料图片)? (或者还有其他方法吗?)
我关注了Graph API's User Reference,但我得到的只是用户的idname(我已经从返回的对话中得到了)。

【问题讨论】:

标签: facebook facebook-graph-api


【解决方案1】:

profile_pic 仅适用于 PSID(Messenger 机器人事件),对于 ASID,只需使用图片字段

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-06-24
    • 1970-01-01
    • 2018-11-19
    • 2011-04-16
    相关资源
    最近更新 更多