Hi all..I want to ask, why i've got error when trying to retrieve user profile.
I have successfully login to facebook and update status to facebook, but when i'm trying to get user's profile data, i've got error...
Please help me to get user's profile data..
Here is the code :
error that appear in tomcat like this :Code:@RequestMapping(value = "/memberArea", method = RequestMethod.GET) public ModelMap getData(@RequestParam(value = "code", required = true) String code) { ModelMap m = new ModelMap(); String accessToken = fBStuffKeeper.retrieveAccessToken(code); //FacebookTemplate fbTemplate = new FacebookTemplate(accessToken); FacebookApi fbApi = new FacebookTemplate(accessToken); System.out.println("success create object fbApi : " + fbApi); try { //fbTemplate.feedOperations().updateStatus("test update status via spring social"); fbApi.feedOperations().updateStatus("test update status via spring social"); System.out.println("success update status); FacebookProfile fbProfile = fbApi.userOperations().getUserProfile(); // error in here System.out.println("profile image : " + fbApi.userOperations().getUserProfileImage()); //it works System.out.println("success"); } catch(Throwable e) { System.out.println(" error : " + e.getMessage()); } return m; }
what should i do?14:00:15.515 [http-8084-22] DEBUG o.s.web.client.RestTemplate - Reading [org.springframework.social.facebook.api.FacebookPr ofile] as "application/json" using [org.springframework.http.converter.json.MappingJac ksonHttpMessageConverter@1727f34]
error : Unexpected graph API exception
in spring-social-reference.pdf, the code is FacebookProfile profile = facebookApi.userOperations().getUserProfile();
but it doesn't works..
FYI, I am using spring-social-1.0.0.M3
thx b4...![]()


I want to ask, why i've got error when trying to retrieve user profile.
Reply With Quote

