CREATE YOUR WORLD
Social
Retrieving Following Status Callback from Room Member List Screen
3 min
we've added a feature that allows you to receive a callback when someone starts following you while playing together in the world make the most of this feature in social content! this feature is available from world sdk version 1 21 21 and zepeto module version 1 0 11 or higher it is applicable in worlds with multiplayer functionality you can check the room member list screen in the zepeto mobile app please refer to the following sample code for how to use the callback of socialservice onroommemberstatuschanged this is an example of printing user id and following status to the console log when the following status of the room member list changes within the world import { roommemberstatus, socialservice } from 'zepeto module social'; import { zepetoscriptbehaviour } from 'zepeto script' export default class samplescript extends zepetoscriptbehaviour { start() { socialservice onroommemberstatuschanged += (userid string, status roommemberstatus) => { console log(`onroommemberstatuschanged userid = ${userid}, status = ${status}`); } } roommemberstatus true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type if you run the sample code above on mobile, you can see that the console log is called every time the following status changes on the room member list screen
