Liking a blog posting
Added by IBM contributorIBM | Edited by Claudia R Elbourn on June 15, 2015
Rate this article 1 starsRate this article 2 starsRate this article 3 starsRate this article 4 starsRate this article 5 stars

If you have not already liked a blog posting, you can do so by sending a request to the web address of the collection categorized by term recommend for the blog posting.
To like a blog entry, complete the following steps:
1. You can only like an entry once. To find out whether you have already liked an entry, retrieve a list of the people who have liked the entry and see if your name is included. See Getting a list of recommenders for more details. Alternatively, complete the following steps:



<title type="text">Likes</title>



term="recommend" />

<app:categories fixed="yes" />

a. Retrieve an entries feed that contains the entry. See Getting a feed of the latest posts added to all blogs or Getting a feed of recent posts for a blog for more information.
b. Find the collection element categorized by term recommend for the entry, and then look for a <app:accept/> element. If this element is present, you have already liked this entry and cannot do so again. If no <app:accept/> is present, you have not liked the entry yet. For example, the collection categorized by recommend for an entry that you have not liked would appear as follows:
2. To like the entry, send an empty POST request to the web address listed as the href of the app:collection.
Method URI Description
POST /blogs/{communityUuid}/api/recommend/entries/{entryId} Value of the href attribute of the <app:collection> element that has a child <title> element with a value of Recommendations in the blog entry.
Content Type: application/atom+xml
Sample Request:
<!--  Leave blank  -->
Name Type Optional Description
string No Community UUID of the blog entry
string No The ID of the entry.
Code Description
Indicates that the comment was successfully found and returned. If an error occurs, this header will contain one of the error codes below.
Bad request: The user has already liked the entry.
Not Found.