skip to Main Content

i want to ask how do i check/see the value inside of this $datame in my code, i tried to var_dump it, i am using mozilla, it didn’t show the value in console/network . Where or how do i check if there were data stored in my variable array.

public function facebook_request(){
        $this->load->library('facebook/src/facebook', array('appId' => '1027885817316593', 'secret' => '6db175699897b514bf4881955b2944bb'));
        $this->user = $this->facebook->getUser();
        if ($this->user) {
            $data['user_profile'] = $this->facebook->api('/me?fields=id,first_name,last_name,email,link,gender,locale,picture');

            // Get logout url of facebook
            $data['logout_url'] = $this->facebook->getLogoutUrl(array('next' => base_url() . 'index.php/oauth_login/logout'));

                $datame = array(
                    'oauth_provider'=> 'facebook',
                    'oauth_uid'     => $data['user_profile']['id'],
                    'first_name'    => $data['user_profile']['first_name'],
                    'last_name'     => $data['user_profile']['last_name'],
                    'email'         => $data['user_profile']['email'],
                    'gender'        => $data['user_profile']['gender'],
                    'locale'        => $data['user_profile']['locale'],
                    'picture'       => $data['user_profile']['picture']['data']['url'],
                    'link'          => $data['user_profile']['link']
                );
                $userData = $this->user_model->checkUser2($datame);
                var_dump($datame);
                exit();

            // Send data to profile page
            $this->load->view('admin/profile.php', $data);

        } 

2

Answers


  1. The server doesn’t have access to write to that. You could pass $datame to the view you are trying to render and print it there or you could replace var_dump($datame) with error_log($datame) and then view your error log to see what it printed

    Login or Signup to reply.
  2. change from

    $userData = $this->user_model->checkUser2($datame);
    var_dump($datame);
    exit();
    

    to

    echo "<pre>";
    print_r($datame);
    exit();
    $userData = $this->user_model->checkUser2($datame);
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search