I am trying to create a category, but consistently get an error when using the json API but not when using the xml API. I am basing my post off of your documentation at:
http://developer.yahoo.com/social/rest_api_guide/categories-resource.html#category-ex_requests_post
Here is what I am posting: (I am using my real GUID but in this message have replaced it with {GUID})
URL: http://social.yahooapis.com/v1/user/{GUID}/categories?format=json
Content-Type: application/json
{"name" : "Family"}
And I get back the following error within the body and a 400 response.
{"error":{"uri":"http://www.yahooapis.com/v1/errors/400","lang":"en-US","description":"Request has malformed syntax or bad query","detail":"invalid format: category not found"}}
Yet, if the only change I make is to use the XML API everything works. I use the exact same code for OAuth signing, connecting, everything.
URL: http://social.yahooapis.com/v1/user/{GUID}/categories?format=xml
Content-Type: application/xml
<category><name>Family</name></category>
It works like a champ. My code is not really geared to shift to an XML based API, I simply hard coded this simple example to see if the same problem I am having with json is happening with XML.
Any help would be greatly appreciated.