render('WallabagImportBundle:Pocket:index.html.twig', array()); } /** * @Route("/auth-pocket", name="authpocket") */ public function authAction() { $pocket = $this->get('wallabag_import.import.pocket_import'); $authUrl = $pocket->oAuthRequest($this->generateUrl('import', array(), true), $this->generateUrl('callbackpocket', array(), true)); return $this->redirect($authUrl, 301); } /** * @Route("/callback-pocket", name="callbackpocket") */ public function callbackAction() { $pocket = $this->get('wallabag_import.import.pocket_import'); $accessToken = $pocket->oAuthAuthorize(); $pocket->import($accessToken); return $this->redirect($this->generateUrl('homepage')); } }