Determining type of object with id in FB Graph API

后端 未结 2 1916
清酒与你
清酒与你 2021-02-01 19:04

Is there a way to determine what kind of object is represented by the given ID https://graph.facebook.com/ID. When I\'m requesting this in Graph API Explorer tool,

相关标签:
2条回答
  • 2021-02-01 19:24

    You can add metadata=1 and response will have metadata: {type: ...} if you do request like that:

    http://graph.facebook.com/object_id?metadata=1&fields=id,name,metadata{type}
    

    Based on commend of Vinicius Tavares.

    0 讨论(0)
  • 2021-02-01 19:32

    This is possible if you using something Facebook call "introspection" by adding metadata argument to your request:

    GET http://graph.facebook.com/object_id?metadata=1
    

    The result will contain type field

    0 讨论(0)
提交回复
热议问题