‘Like’ a page using Facebook Graph API

Facebook has announced support for liking URL’s outside of Facebook by using the official built-in Like action. You need to have publish_actions permissions. The graph url for this is:
https://graph.facebook.com/[User FB ID]/og.likes?object=OG_OBJECT_URL&access_token=USER_ACCESS_TOKEN

However, you cannot use this to like a page on Facebook currently, as the documentation states:

For Facebook Pages or websites that do not integrate with Facebook
Authentication, developers should continue to use the Like button
social plugin.

Leave a Comment