Support » Plugin: WP ULike - Most Advanced WordPress Marketing Toolkit » WP ULike REST API dislike not working

  • Resolved artakusuma

    (@artakusuma)


    So I’m trying to dislike a post using WP ULike REST API

    According to this article: https://wpulike.com/blog/how-to-get-started-with-wp-ulike-rest-api/

    But seems the dislike status is not working when I create a vote for the first time

    so this is what I sent in body:

    {
        "item_id": 6279,
        "user_id": 777,
        "type": "post",
        "status": "dislike"
    }

    Instead of return down -1, the response was like this:

    {
        "code": "success",
        "message": "Item Inserted.",
        "data": {
            "status_code": 3,
            "counter_value": {
                "sub": "+10",
                "up": "+10",
                "down": "0"
            }
        }
    }

    but it’s working when I try to update (PUT) with this code in:

    {
        "item_id": 6279,
        "user_id": 777,
        "type": "post",
        "status": "dislike"
    }

    this is the response using update method (PUT):

    {
        "code": "success",
        "message": "Item Updated.",
        "data": {
            "status_code": 3,
            "counter_value": {
                "sub": "+9",
                "up": "+10",
                "down": "-1"
            }
        }
    }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.