Hello i am using firebase with php and using this library.
I am getting this error."Could not parse auth token."
My auth token is correct because i have used same token with node.js also.
my code looks like this
require "vendor/autoload.php";
const DEFAULT_URL = 'https://xxxxxxxxx.firebaseio.com';
const DEFAULT_TOKEN = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
$firebase = new \Firebase\FirebaseLib(DEFAULT_URL, DEFAULT_TOKEN );
$data = [
"Website_Name"=> $Website_Name,
"Username" => $Username,
"Password"=> $Password,
"website_link"=> $website_link,
"id"=> $id,
];
$path = "per_users";
$res = $firebase->push('/per_users', $data);
// per_users is the name of the table
var_dump($res);
can you please tell me what exactly i am doing wrong. thanks.
I'm using somethink like this and it works for me. without any library. simple.
I found the following solution worked, if anyone would still want to use topic starter's library:
const DEFAULT_TOKEN