drupal: how to post a comment through services API?
I am currently developping a mobile application with a drupal 7 website as a backend. Using the services API w开发者_如何学运维ith a REST server I was able to easily access the nodes, users, files and comments to see their content. I am able via a POST request to log in the website but I cannot create a comment through the services API. Actually, there is no error and a new comment is well created in the database but it is empty and its nid is 0. I also tried to download a valid comment, modify it with new datas, and send it but I have the same result. I also need to add that the comments I am using or not just simple ones, they include some specific fields in their form. Can anyone help me to solve this problem ? Has anyone ever experience something similar ? Thank you
Check you are posting an object that is correctly structured, services isn't doing a comment_save()
Have a look at the test scripts for the structure
http://drupalcode.org/project/services.git/blob/refs/heads/7.x-3.x:/tests/functional/ServicesResourceCommentTests.test#l100
精彩评论