You are correct. You need to retrieve the unique identifier of the page/photo/post/etc. you wish to like, then make a POST request to https://graph.facebook.com//likes.
Check out this page of the Facebook Developers documentation, under the subheading "Publishing".