Instagram\Instagram::saveSession PHP Method

saveSession() public method

Save the current Instagram session to a JSON string
See also: Instagram::initFromSavedSession()
public saveSession ( ) : string
return string Instagram session as JSON string
    public function saveSession()
    {
        $session = array("loggedInUser" => $this->getLoggedInUser(), "cookies" => $this->getCookies(), "csrfToken" => $this->getCSRFToken(), "rankToken" => $this->getRankToken(), "phoneId" => $this->getPhoneId(), "deviceId" => $this->getDeviceId(), "guid" => $this->getGUID(), "uuid" => $this->getUUID(), "googleAdId" => $this->getGoogleAdId());
        return json_encode($session);
    }