Search code examples
javascriptnode.jsquickblox

How to update a user's tags ? using Quickblox javascript SDK


How can i update a user' tags using Quickblox javascript SDK ? i tried using the following parameter names :

user_tags
tags

using

var params = {
    user_tags: ["testing"]
};

Please don't answer me with "you can use custom objects, etc.." i'm already using them for something else. I want to use tags, and nothing else


Solution

  • As stated in the table on this page: http://quickblox.com/developers/Users#Update_API_User_by_identifier you should use tag_list key which accepts a comma separated list of tags.

    QB.users.update(user_id, { tag_list: "tag1,tag2" }, callback);
    

    Unfortunately QB docs aren't the best in the world...