@ RequestMapping ( value = "/{subscription}" , method = GET , params = "hub.mode=subscribe" ) public @ ResponseBody String verifySubscription ( @ PathVariable ( "subscription" ) String subscription , @ RequestParam ( "hub.challenge" ) String challenge , @ RequestParam ( "hub.verify_token" ) String verifyToken ) { logger . debug ( "Received subscription verification request for '" + subscription + "'." ) ; return tokens . containsKey ( subscription ) && tokens . get ( subscription ) . equals ( verifyToken ) ? challenge : "" ; }
Handles subscription verification callback from Facebook .