Controller/DefaultController.php
public function requestPublicAction()
    {
        $importer = $this->get('linkedin.importer');
        $form = $this->createForm(new LiForm\RequestPublic());
        $request = $this->getRequest();

        if ($request->getMethod() == 'POST') {

            $form->handleRequest($request);

            if ($form->isValid()) {
                $form_data = $form->getData();
                //add the other user's public profile url to the redirect
                $importer->setRedirect($this->generateUrl('ccc_linkedin_importer_receivePublic', array('submit' => true, 'url' => urlencode($form_data['url'])), true));
                //still need to ask the current user for permission to go through our app
                return $importer->requestPermission('public');
            }
        }

        return $this->render('CCCLinkedinImporterBundle:Default:requestPublic.html.twig', array('form' => $form->createView()));
    }
public function requestPublicAction()
    {
        $importer = $this->get('linkedin.importer');
        $form = $this->createForm(new LiForm\RequestPublic());
        $request = $this->getRequest();

        if ($request->getMethod() == 'POST') {

            $form->handleRequest($request);

            if ($form->isValid()) {
                $form_data = $form->getData();
                //add the other user's public profile url to the redirect
                $importer->setRedirect($this->generateUrl('ccc_linkedin_importer_receivePublic', array('submit' => true, 'url' => urlencode($form_data['url'])), true));
                //still need to ask the current user for permission to go through our app
                return $importer->requestPermission('public');
            }
        }

        return $this->render('CCCLinkedinImporterBundle:Default:requestPublic.html.twig', array('form' => $form->createView()));
    }
public function requestPublicAction ( ) { $ importer = $ this -> get ( 'linkedin.importer' ) ; $ form = $ this -> createForm ( new LiForm \ RequestPublic ( ) ) ; $ request = $ this -> getRequest ( ) ; if ( $ request -> getMethod ( ) == 'POST' ) { $ form -> handleRequest ( $ request ) ; if ( $ form -> isValid ( ) ) { $ form_data = $ form -> getData ( ) ; //add the other user's public profile url to the redirect $ importer -> setRedirect ( $ this -> generateUrl ( 'ccc_linkedin_importer_receivePublic' , array ( 'submit' => true , 'url' => urlencode ( $ form_data [ 'url' ] ) ) , true ) ) ; //still need to ask the current user for permission to go through our app return $ importer -> requestPermission ( 'public' ) ; } } return $ this -> render ( 'CCCLinkedinImporterBundle:Default:requestPublic.html.twig' , array ( 'form' => $ form -> createView ( ) ) ) ; }
Example of how to request the user's public data.
First step is same as above, except that this form has a text field to input another user's public profile url
Example of how to request the user s public data . First step is same as above except that this form has a text field to input another user s public profile url