简体   繁体   English

如何知道图形API响应中的数据类型?

[英]How can I know the data type in graph API response?

I'm beginner of graph API. 我是图API的初学者。 For my Application, I have to use many graph API at the same time. 对于我的应用程序,我必须同时使用许多图形API。

My question is... how can I know the response's data type? 我的问题是...我怎么知道响应的数据类型? => How can I know the response that it is the friends data? =>如何知道响应是朋友数据?

ex) for friend data. 例如)获取朋友数据。 In response data, I can't find the data name for friend.(== like friend tag name in XML response) 在响应数据中,我找不到朋友的数据名称。(==类似于XML响应中的朋友标签名称)

  • request Graph URL = https://graph.facebook.com/100000726819009/friends 请求图URL = https://graph.facebook.com/100000726819009/friends

  • response data in graph API for friends 朋友在图谱API中的响应数据


{                               
  "data": [                     
    {                           
      "name": "Jong-Mu Choi",   
      "id": "1931865"           
    },                          
    {                           
      "name": "Joo Yeon Kim",   
      "id": "4812863"           
    },                          
    {                           
      "name": "Tommy Kang",     
      "id": "516573995"         
    },                          
    {                           
      "name": "Hyeoniee Jeong", 
      "id": "526059737"         
    },                          
    {                           
      "name": "Sung Park",      
      "id": "528812415"         
    }                           
  ]                             
}

http://graph.facebook.com/cocacola?metadata=1 http://graph.facebook.com/cocacola?metadata=1

You will see type=page at the bottom. 您将在底部看到type=page

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何区分这是什么类型的 JSON API 响应? - How can I distinguish what type of JSON API response this is? 我如何将JSON数据发布到Facebook GRAPH API - How can i post JSON data to the facebook GRAPH API Cypress 如何获取 API 响应数据的长度? - Cypress How can I get length of API response data? Rest API 以纯字符串形式发送响应,但内容类型为“application/json;charset=UTF-8”。 我如何阅读回复 - Rest API sends response as plain string however Content Type is "application/json;charset=UTF-8". How can I readthe response 我想知道此值的类型以及如何使用它? - I want to know the type of this value and how can I use it? 如何转换Facebook Graph API JSON数据以查找数据库中已存在的用户? - How can I convert Facebooks Graph API JSON data to find a user that already exists in my database? 如何简单地绘制JSON数据图? - How can I simply graph JSON data? Ruby API 响应视图:如何呈现 JSON 响应? - Ruby API response view : how can I render a JSON response? 我如何将 json 响应 object 的特定数据类型存储在数组中(例如:数字)以将数据源作为变量传递 - How can i store the particular data type of the json response object in an array (ex: of numbers) to pass in datasource as variable 我怎么知道一个类型是否可以使用Json.NET进行转换? - How can I know if a type is convertible using Json.NET?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM