Is it possible that I place a like button on my android app clicking which likes a post which is publicly available on facebook? I do not want any additional windows to open for the task except may be for first time authentication.
All questions asked so far are related to opening a new window.
It is possible. You can perform a Like Action using Facebook's Open Graph API. In order to do so, you need to meet certain conditions:
Steps at a high-level:
You need to first get the user's active
Session(com.facebook.Session).Then you need to ensure that the user has the
publish_actionspermission. If not, request them.Finally, send your request to
"me/og.likes". Your request should include yourSession, aBundleincluding the Graph object you want to like, the HTTP method, and a callback that will execute once you receive a response.You want to perform these steps in your button's
OnClickListener.Hope this helps!
Resources:
Like Action
Publishing Conditions