Skip to end of metadata
Go to start of metadata

About

if you have already liked a status update message, you can remove the like (unlike it) by sending a DELETE request to the web address of the status update entry. Here's one easy way to do it with an asynchronous HTTP (Ajax) request using jQuery.

There is no a link to IBM Connections 4 documentation.

Atom API Request Details

Headers

Content-Type: application/json
TypeDELETE
URL

{host}/connections/opensocial/rest/ublog/@all/@all/{post-id}/likes/{user-id}

Example:

https://www.mysite.com/connections/opensocial/rest/ublog/@all/@all/9b33a6ff-377f-44fd-ac40-de2647d038bc/likes/B0852-C2-1B-EE-1C1AB8

Response Status Code: 200 OK
Example using jQuery

$.ajax({
    url : "https://www.mysite.com/connections/opensocial/rest/ublog/@all/@all/9b33a6ff-377f-44fd-ac40-de2647d038bc/likes/B0852-C2-1B-EE-1C1AB8",
    type : "DELETE",
    contentType: "application/json",
    async : true,
    statusCode : {
        200 : function() {
            console.log('Unliked');
        }
    },
    error: function(jqXHR, textStatus, errorThrown) {
        console.log(jqXHR + " - " + textStatus + ' - ' + errorThrown);
    }
});

Note: console.log can throw errors in IE, they are there for illustrative purposes only and should be changed as required.

About the author

Enterprise Web Developer
Joaquin is an Enterprise Web Developer at Base22 with over seven years of experience designing and developing web solutions for enterprise clients. He is a well rounded web developer with skills building interfaces in IBM WebSphere Portal and WCM, IBM Connections, and many others. He is an Oracle Certified Java Developer and a Microsoft Certified Visual Studio Developer. He blogs at http://j-arellano.com

 

  • No labels