1

I am trying to insert comment from my android app , i am using REST API and POST method

/wp-json/wp/v2/comments/

The method is working great , but I would like to include metadata when inserting the comment , to replace this line :

add_comment_meta( $comment->comment_ID, 'comment_type', 'answer', true );

i tried inserting type with parameters but i get : rest_invalid_comment_type

I tried ' meta ' and i got the error : rest_invalid_param

So is there a way to insert a comment with metadata in one POST request

Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.