0
{
"response": {
"request": {
"date": "Tue, 13 Sep 2011 11:24:28 +0200",
"resource": "https://stackoverflow.com/users/2cec711d-ca14-4472-98c8-ca74432bc2d3.json",
"status": {
"flag": "success",
"code": 200
}
},
"result": {
"data": {
"user": {
"user_token": "2cec711d-ca14-4472-98c8-ca74432bc2d3",
"date_creation": "Tue, 1 Sep 2011 11:01:12 +0200",
"date_last_login": "Tue, 13 Sep 2011 01:05:07 +0200",
"num_logins": "64",
"identities": [{
"identity_token": "cd3bd13b-b393-4d6c-a7f6-950b4c47938f",
"provider": "twitter",
"id": "http://twitter.com/ExampleUser",
"displayName": "Firstname Lastname",
"name": {
"formatted": "Firstname Lastname"
},
"gender": "male",
"utcOffset": "2:00"
}, {
"identity_token": "3ab5257b-ba2b-4242-a7f6-950b4c47938f",
"provider": "facebook",
"id": "http://www.facebook.com/profile.php?id=1046121518",
"displayName": "Firstname Lastname",
"name": {
"formatted": "Firstname Lastname",
"givenName": "Firstname",
"familyName": "Lastname"
},
"gender": "male",
"birthday": "01/01/1980",
"utcOffset": "2:00",
"emails": [{
"value": "[email protected]",
"is_verified": "true"
}]
}]
}
}
}
}
}
上面的代碼是結果:由ONEALL API 我使用oneall API爲我的網站社會登錄返回的代碼後,我登錄我使用用戶令牌的用戶信息通過GET方法,像上次登錄的數值了通過使用$data->user->date_last_login
,但我無法得到電子郵件和dispalyname我怎麼做一個,我沒有寫的所有代碼我給剛剛品嚐,希望這將幫助其他人也如何從oneall API獲取電子郵件和顯示名稱?
http://docs.oneall.com/api/resources/users/read-user-details/
我沒有得到這些值問題在哪裏,這是我如何創建連接到oneall api $ json = json_decode($ result_json); //提取數據 $ data = $ json-> response-> result-> data; –
罰款,然後只是使鏈較短,看到更新。 – mitkosoft
我用像$ data-> user-> identity [1] - > emails [0] - > value;對於電子郵件,但它沒有得到 –