I want to write a java (spring controller) where i can receive callback url sent by facebook whenever a user de-authorizes my app.
I have specified the correct URL in my app and have read the documentation provided on fb. But i don't know how to write a controller file. I have tried this.
@Controller
public class RemoveAppController {
private static Logger log = LoggerFactory.getLogger(RemoveAppController.class);
@RequestMapping(value="/deauthorizehandler.htm", method=RequestMethod.POST)
public void removeApp(HttpServletRequest request) throws Exception {
log.info("DeAuthorize Callback getting successfully");
}
}
Am i somewhere wrong ? Because this controller is not getting executed. URL i have specified in my app is http://localhost:8080/server/deauthorizehandler.html which i have mapped.server is running fine. Please help.
I have got the answer, Running Facebook application on localhost
We can not use localhost for receiving deauthorize callback. Quite a simple concept and I missed it..