We have published a blog on Integration With Facebook Using Grails OAuth Plugin through which a user can authenticate with Facebook and get some user information. Now one common requirement is post some message or share some link on Facebook. We can easily achieve this using grails OAuth plugin.

  • Authenticate With Facebook
    Use above mentioned link to install grails OAuth plugin and authenticate users.
  • Post A Message
    Use following code to post some content on Facebook-

Here note that you have to send something message, link and/or picture otherwise you got a error message in the response.

I have deployed a demo project in Heroku.
See this code in action (DEMO).

Hope this helps 🙂 .