2013-03-21 43 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