SnapchatFriendUserInfo
ClassDetails about friendship between the active user and another user.
- Available on all platforms
Platform details: Snapchat, SPECS, Camera Kit Web, Camera Kit Mobile fully supported.
Since Lens Scripting v347
Index
Properties
Methods
Example
async function getFriends() {
return new Promise(function (resolve, reject) {
global.userContextSystem.getAllFriends(function (friends) {
resolve(friends);
});
});
}
async function init(){
let friends = await getFriends();
friends.forEach(f => {
let friendshipStartDate = f.friendInfo.friendshipStart;
let lastInteractionTime = f.friendInfo.lastInteractionTime;
print(`Friendship with ${f.displayName} started on ${friendshipStartDate}, last interacted on ${lastInteractionTime}`)
});
}
init();
Properties
friendshipStart
readonlyfriendshipStart:Date
When this friendship started.
Since
Lens Scripting Version 347
lastInteractionTime
readonlylastInteractionTime:Date
Last interaction between this user and the active one.
Since
Lens Scripting Version 347
Methods
getTypeName()
staticgetTypeName():TypeName<SnapchatFriendUserInfo>
Returns the fully-qualified JavaScript type name for this class (for example, "Component.Camera"). This is a static accessor (no instance required) and returns the same value as the instance getTypeName().
Returns
TypeName<SnapchatFriendUserInfo>
Since
Lens Scripting Version 347