2013-03-21 128 views
0

Facebook图形API是否提供Reflection类似the Flickr API如何以编程方式获取图形API方法

例如,Flickr的提供有关flickr.urls.lookupUser方法下列反射信息:

{ "method": { "name": "flickr.urls.lookupUser", "needslogin": 0, "needssigning": 0, "requiredperms": 0, 
    "description": { "_content": "Returns a user NSID, given the url to a user's photos or profile." }, 
    "response": { "_content": "<user id=\"[email protected]\">\r\n <username>Stewart<\/username> \r\n<\/user>" } }, "arguments": { 
    "argument": [ 
     { "name": "api_key", "optional": 0, "_content": "Your API application key. <a href=\"\/services\/api\/misc.api_keys.html\">See here<\/a> for more details." }, 
     { "name": "url", "optional": 0, "_content": "The url to the user's profile or photos page." } 
    ] }... 
+1

你为什么要这么做?它在Graph API的文档中。 – 2013-03-21 19:51:00

+0

我没有看到这个问题有什么问题。他们正在寻求像Flickr API那样的反思(请参阅https://www.flickr.com/services/api/flickr.reflection.getMethodInfo.htm)。反射可以以许多方式使用,例如在API包装中提供交互式帮助,通过代码生成实现等。 – 2014-08-30 01:20:35

回答

4

存在要programmtically得到documenation最接近的是使用metadata=1参数在该呼叫。这将返回一个metadata对象与connections对象具有(又名 - 额外的端点),沿其fields

Here is an example说明:

GET /me?metadata=1 
相关问题