Controller/DefaultController.php
public function requestPrivateAction()
    {
        //load up the importer class
        $importer = $this->get('linkedin.importer');

        //set a redirect for linkedin to bump the user back to after they approve your app
        $importer->setRedirect($this->generateUrl('ccc_linkedin_importer_receivePrivate', array('submit' => true), true));

        //nothing on this form except for a submit button to start the process
        $form = $this->createForm(new LiForm\RequestPrivate());
        $request = $this->getRequest();

        if ($request->isMethod('POST')) {

            $form->handleRequest($request);

            if ($form->isValid()) {
                //user hit the start button, so request permission from the user to allow your app on their linkedin account
                //this will redirect to linkedin's site
                return $importer->requestPermission();
            }
        }

        return $this->render('CCCLinkedinImporterBundle:Default:requestPrivate.html.twig', array('form' => $form->createView()));
    }
public function requestPrivateAction()
    {
        //load up the importer class
        $importer = $this->get('linkedin.importer');

        //set a redirect for linkedin to bump the user back to after they approve your app
        $importer->setRedirect($this->generateUrl('ccc_linkedin_importer_receivePrivate', array('submit' => true), true));

        //nothing on this form except for a submit button to start the process
        $form = $this->createForm(new LiForm\RequestPrivate());
        $request = $this->getRequest();

        if ($request->isMethod('POST')) {

            $form->handleRequest($request);

            if ($form->isValid()) {
                //user hit the start button, so request permission from the user to allow your app on their linkedin account
                //this will redirect to linkedin's site
                return $importer->requestPermission();
            }
        }

        return $this->render('CCCLinkedinImporterBundle:Default:requestPrivate.html.twig', array('form' => $form->createView()));
    }
public function requestPrivateAction ( ) { //load up the importer class $ importer = $ this -> get ( 'linkedin.importer' ) ; //set a redirect for linkedin to bump the user back to after they approve your app $ importer -> setRedirect ( $ this -> generateUrl ( 'ccc_linkedin_importer_receivePrivate' , array ( 'submit' => true ) , true ) ) ; //nothing on this form except for a submit button to start the process $ form = $ this -> createForm ( new LiForm \ RequestPrivate ( ) ) ; $ request = $ this -> getRequest ( ) ; if ( $ request -> isMethod ( 'POST' ) ) { $ form -> handleRequest ( $ request ) ; if ( $ form -> isValid ( ) ) { //user hit the start button, so request permission from the user to allow your app on their linkedin account //this will redirect to linkedin's site return $ importer -> requestPermission ( ) ; } } return $ this -> render ( 'CCCLinkedinImporterBundle:Default:requestPrivate.html.twig' , array ( 'form' => $ form -> createView ( ) ) ) ; }
Example of how to request the user's private data.
Example of how to request the user s private data .