Firebase 正在踢我的**。我正在尝试使用 php 从用户表中获取一列(令牌)
我设置了待办事项路径
$todoPath = 'users/'.$userId.'';
获取数据
$response = $fb->get($todoPath);
并得到这个 $response:
{"lastName":"Sengbe","location":{"name":"San Francisco, California","id":"114952118516947"},"timezone":"-7","birthday":"06/25/1978","- J445njkymYw9INQcvAi":{"lastName":"Bond","location":{"name":"San Francisco, California","id":"114952118516947"},"tokens":2,"timezone":"-7","birthday":"06/25/1978","userName":"whosesse","name":"James Sengbe","verified":"true","provider":"facebook","gender":"male","email":"james@bond.com","firstName":"James"},"userName":"whosesse","name":"james Bond","verified":"true","provider":"facebook","gender":"male","email":"James@bond.com","firstName":"James"}
现在我想从中获取令牌。我没有尝试过
试过了
$tokens=$response->{'tokens'}
$tokens=$response['tokens'];