Lấy thông tin profile
Response response.data là dictionary như sau :
{
"id": "UserId",
"name": "User Name",
"picture": {
"data": {
"url": "User avatar url"
}
}
}
Sample code
ZaloSDK.sharedInstance().getZaloUserProfile(withAccessToken: accessToken) { (response) in
if response?.errorCode == ZaloSDKErrorCode.sdkErrorCodeNoneError.rawValue {
// Thành công
} else {
// Có lỗi xảy ra
}
}
- accessToken: xem lại việc lấy accessToken tại bước Lấy AccessToken