Spaces:
Running
on
Zero
Running
on
Zero
/** | |
* Line data class | |
*/ | |
class LineData { | |
/** | |
* Get user data from Line | |
* @param {string} accessToken | |
* @return {object} user data | |
*/ | |
function getUserData(accessToken) { | |
var lineAPI = new LineAPI(); | |
var userProfile = lineAPI.getUserProfile(accessToken); | |
var userData = { | |
'displayName': userProfile.displayName, | |
'userId': userProfile.userId, | |
'pictureUrl': userProfile.pictureUrl | |
}; | |
return userData; | |
} | |
} |