我正在尝试解析我从 GoogleFit API 获得的响应。这是我写的片段:
1 $result = curl_exec($ch);//execute post
2 curl_close($ch);//close connection
3 $newResult = json_encode($result);
4 Log::info($newResult);
5 return $newResult;
响应如下所示:
{ "access_token": "ya29.Il-4B1111", "token_type": "Bearer", "expires_in": 3600, "refresh_token": "1//09uJO5Lo7CFhyCg3333", "scope": "https://www.googleapis.com/auth/fitness.activity.read https://www.googleapis.com/auth/fitness.location.read" } true
第 4 行是 Logging 而不是响应。
true
我想将access_token,refresh_token和存储expires_in在我的db. 我也无法访问响应的属性。请帮忙
皈依舞
慕工程0101907
杨__羊羊
慕尼黑的夜晚无繁华