On Wed, Jul 25, 2012 at 12:14 PM, Melvin Carvalho
<melvinc...@gmail.com> wrote:
*every* page on the web supports content negotiation
ok, maybe i should have made my question more specific - can you give an example where the 'Accept' request header is being taken into account? For instance if i try:
I still get text/html back. So either my curl command is wrong, or content negotiation (in the strict sense) is not supported for that resource.
The content type will tell you what you are getting and you parse it accordingly.
yes, that i do, of course. but my question was whether i can also influence it with a request header.
FB is not perfect, but certainly developer friendly, and better than most.
sure
it's well documented JSON in the open graph protocol. They tell you what every field means.
yes, but well documented != self-documenting.
Facebook is fully self documenting e.g. in tabulator
no, it is not. In the sense that if i have never heard of facebook, and am not aware that it's a proprietary walled garden with a specific proprietary API format, I retrieve the following:
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Cache-Control: private, no-cache, no-store, must-revalidate
Content-Type: text/javascript; charset=UTF-8
ETag: "82ed88dd63a251e2139b0ab085ae439532f2b0ec"
Expires: Sat, 01 Jan 2000 00:00:00 GMT
Pragma: no-cache
X-FB-Rev: 597466
X-FB-Debug: nPsD/2KFDF8gYv5mESFD+iRy3rNMkAKVeuey3dL/eYI=
Date: Wed, 25 Jul 2012 12:02:34 GMT
Connection: keep-alive
Content-Length: 204
{"id":"512908782","name":"Tim Berners-Lee","first_name":"Tim", /
"last_name":"Berners-Lee","link":"http:\/\/
www.facebook.com\/tim.bernerslee.9", /
"username":"tim.bernerslee.9","gender":"male","locale":"en_US"}
Where is the documentation? How do i know what "link" means in this JSON document?
Type
Property
Comment
The user's full name. No `access_token` required. `string`.Domain
user
Label
nameetc.
i tried this but it didn't work for me - anyway, it's interesting because it does what we want! do you know where/how tabulator retrieves this information? From the example above, I see no way to discover that info.