Follow button for Moments

The follow button lets a Viewer follow a player, a team, or a competition in a Moment. The SDK stores that entity on the device. A widget set to the followed entities data source reads that list. The button does not change the widget's data source.

Follow button

The button shows one entity per Moment. A tap follows that entity. A second tap unfollows it. The control updates immediately.

You set the icon, the Follow label, and the colors for each state in the Moments style. The icon can be a star: an outline while the Viewer is not following, and a filled star while they are. Set the icon on both states. A state you leave unset stays a plus or a check. See iOS | Android | Web.

Which entity the button shows depends on how the Moment was created. See Which entity the button shows.

On by default

On Android, iOS, React Native, and Flutter, the Moments player shows the follow button by default. After an SDK upgrade, a Viewer can see the button with no change in your app.

  • Android: On by default starting with 1.21.2. To turn it off, set followEntity.isVisible = false on BlazeMomentsPlayerStyle. See isVisible.
  • iOS: On by default starting with 1.21.3. To turn it off, set followEntity.isVisible = false on BlazeMomentsPlayerStyle. See Player style configuration.
  • React Native: On by default starting with 1.21.0. To turn it off, set followEntity: { isVisible: false } on BlazeMomentsPlayerStyle. See BlazeMomentsPlayerStyle.
  • Flutter: On by default starting with 1.21.0. To turn it off, set followEntity: BlazeMomentsPlayerFollowEntityStyle(isVisible: false) on BlazeMomentsPlayerStyle.
  • Web: Off by default. The button shows only once you add the addFollowButton action handler. To hide it, remove the handler or set playerStyle.followButton.isVisible to false. See Follow Button.

Follow images

The button shows only for an entity that has a follow image on the WSC Sports side. Without a follow image, the Moment shows no button, even when the button is on. See What you need.

Follow images belong to the account the Moments come from. If your Moments come from a shared account, such as a league account, the entities may already have follow images. The button then shows after you upgrade. Check with your WSC Sports account team before you upgrade, or turn the button off.

Follow list

Every follow or unfollow from a tap is stored on the device immediately. The stored list works for every Viewer, including an anonymous Viewer. The list survives an app restart and works offline. A tap needs no backend and no extra host code.

On Android, SDK storage of the follow list starts with 1.21.2. The widget source that reads the list is available on Android, iOS, Web, and React Native. See the versions on Followed entities data source.

What a tap does

A tap writes one entity into the follow list. It does not switch a widget onto the followed entities data source. The widget must already use that data source. Reload the widget to show the new follow. See Followed entities data source.

Until that data source, you translated the followed entity into labels and used labels(). That path remains when the follow should filter or rank a wider feed. See Explicit personalization.

Sync across devices

Sync is optional. When activity sync is on and the Viewer is identified (an externalUserId is set), the SDK syncs the same local list to WSC Sports and back. There is no separate follow switch. Sync runs on the normal batch and refresh cycle, so a follow on one device shows up on another after the next cycle, not on the tap. The list on the device updates immediately. See Cross-device activity sync.

Set the list from your app

Your app can also write the list, to seed it from your own backend or to match a follow made in your own UI. The ID identifies the follow.

Pass entityType with each entity your app writes. The type is a player, a team, or a property. A competition is a property, and the value is Property. A tap on the button already includes the type from the Moment. Leaving entityType off leaves any type the SDK already stored for that ID.

entityType is available starting with: Android 1.21.2 | iOS 1.21.3 | Web 0.37.1 | React Native 1.21.0. Each platform page shows the value to pass. See iOS | Android | Web | React Native.

iOS and Android

  • Incremental: insert or remove adds or removes one entity. An incremental call never changes an entity you did not name, so it is safe to call from multiple devices.
  • Read: getFollowedEntities returns the stored list, including entityType when the SDK knows it.

Web

Web has no insert, remove, or read API. A tap on the follow button updates the stored list. To replace the whole list, pass followedEntities to Initialize. That call writes the list. The widget reads the list through DataSourceBuilder().followedEntities().

Replace

setFollowedEntities on iOS and Android, or Initialize({ followedEntities }) on Web, sends the complete list. The new list overwrites every other follow, including a follow made on another device. Once sync is on, the latest list wins on every device the Viewer uses.

Use replace only when the list is the Viewer's complete, correct list. On iOS and Android, use insert or remove to add or remove one entity. A replace call with a stale list can erase a follow made moments earlier on another device.

Which entity the button shows

Automated content

Entity order comes from the WSC Sports publish pipeline and rules. SDK priority is Subject ID (when rules set one), then Player, then Team, then Competition. You can configure the SDK to prefer players, teams, or a custom order. Subject IDs are players or teams only. Content managers can't change entity order for this content in Library.

Uploaded content

Content managers tag players and teams in Arena Library (Edit metadata). The first name in Players (or the first name in Teams, for team follow) is the entity the button uses. Put the player or team at the center of the play first. Moments usually highlight one play.

For content managers

This workflow applies to uploaded assets in Library only.

Players

  1. Open the asset > Edit metadata > Players to see who is tagged.
  2. Add the player Viewers should follow. If several players are listed, the first is the follow subject.
  3. To reorder, select Edit, uncheck all, select the followable player first, then add any others.

Teams

Use the same pattern in Teams. The first team is the follow subject for team follow.

Publish to Experiences when the metadata is correct, so the Moment includes the updated tags.

If the metadata looks right and the button is still missing, the tagged entities may lack follow images. Coordinate with your WSC Sports account team on follow image mapping.

What you need

  • Assets: Player headshots, team logos, and competition logos when you use them. WSC Sports configures a FollowImage app type and maps the assets to entity IDs. Coordinate with your account team.
  • Entity IDs: Use the same player, team, and competition IDs as your data provider and WSC Sports.
  • Backend: A backend is optional. Add one only when your own screens need the follow list outside the SDK, or when you manage follow state without activity sync.

Add the button

On Android, iOS, React Native, and Flutter, the button is already on. See On by default. On Web, add the addFollowButton action handler to the Moments player. The button is enough for the list to persist on the device and, once activity sync is on, to sync across the Viewer's devices. It does not change the widget's data source. Implement the follow or unfollow callback only when you need the event for your own purposes, such as analytics, prompting sign-in, or mirroring state in your own UI. See iOS | Android | Web | React Native.

Sample apps

The Follow sample shows writing the list on launch, the callback, and an optional app copy of the list. The widget still has to use the followed entities data source. See Android Follow sample | iOS Follow sample.

Web has no sample app. Follow the API reference: SDK class | global delegate methods.

For the full list of sample apps, see Sample apps.

Limitations

  • Content type: The button is for Moments only. The followed entities data source can return Stories, Moments, and Videos.
  • Uploaded content: Only uploaded content supports manual metadata control in Library. Automated content uses WSC Sports ingest order.
  • Entity types: Players, teams, and competitions only. Custom entities, such as coaches or venues, are not supported.

Did this page help you?