We are creating custom application, in which we want documents or our images to be "liked" using the like button.
Is here any exposed API of alfresco or share application that we can use in our custom application?
In addition to Axel's reply, you might also consider using the public Node Ratings REST API (Alfresco Content Services REST API Explorer) with "likes" rating scheme id.
IIRC, this is available since Alfresco 4.2 (to 5.2) and is used by our current iOS & Android mobile clients. You can look at how they use the API or refer to some tests for some example usage.
Retrieving data ...