May 2015
Intermediate to advanced
234 pages
4h 18m
English
In this recipe, you'll learn how to post a custom object to a Facebook user's Timeline from a Spring web application. A custom object is a link with more customizable options: picture, privacy, and location. In this recipe, we will add a picture to a link.
This recipe uses the code from the Connecting to Facebook recipe.
Here are the steps to post a custom object:
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 PostData object using the Facebook object:PostData postData = new PostData(facebook.userOperations().getUserProfile().getId()); ...
Read now
Unlock full access