After the following conditions are met ...
An application can publish the built-in Like action, on behalf of the user, as if the following conditions are true:
- The content viewer in the application is a Facebook user who has Facebook-authed and has granted permission to publish the application.
- The content of the application has a page with objects of an open graph, which is correct using the Open Graph meta tags
- The viewer deliberately clicked the โlike buttonโ button in the application, associated with the content in the application.
you call the API like this:
FB.api('/{object id}/likes', 'post');
Link: https://developers.facebook.com/docs/opengraph/actions/builtin/likes/
"Likes" must be pre-configured by webmasters, otherwise Facebook does not know what you really "love." Each of them has an object identifier associated with it. If this is your own website, you need to configure what your site may like (and the FB associates an ID with it), then you can send the name you like for this object.
source share