May 2015
Intermediate to advanced
234 pages
4h 18m
English
In this recipe, you'll learn how to post a link on a Facebook user's Timeline from a Spring web application.
This recipe uses the code from the Connecting to Facebook recipe.
Here are the steps to post a link on a Facebook user's Timeline:
FacebookController class, in the login() method, add publish_actions to the scope parameter: params.setScope("public_profile, publish_actions");fb() method, in the if(facebook.isAuthorized()) block, create a FacebookLink object with the link URL, title, caption, and description:FacebookLink link = new FacebookLink("http://jeromejaglale.com/", "Spring is easy with Spring Cookbook", "Spring Cookbook", "The recipes are understandable and actually work."); ...Read now
Unlock full access