Discovery Widget is supported on iOS, Android, and Web. Flutter and React Native are not supported.
How it works
The widget fetches an ordered selection of posts for its configured topic and displays them in a read-only carousel. Readers can browse previews and select a card. Reacting, commenting, voting, and media playback happen outside the widget, at the destination your app provides. Recommendations use topic relevance as the main signal, with post engagement and freshness helping order relevant conversations. They are based on the topic rather than the reader’s personal interests. Eligibility rules and viewer-specific restrictions, such as blocked authors, can affect which posts appear. See Topic-based content discovery for the SDK integration.Before you start
Configure a topic in the social.plus Console and obtain its topic ID. Set up your app’s UIKit integration and establish a user session or a visitor session before displaying the widget. Choose where a card should open in your app, such as a post detail page or your hosted community.Embed the widget
Pass a topic ID and handle card selection withonCardClick.
Parameters
Display behavior
The widget adapts to compact and expanded layouts. Readers swipe through cards; Web and Android also provide navigation arrows in the expanded layout. The widget renders nothing when the request fails or the number of renderable posts is belowminVisibilityThreshold. It shows no heading, empty state, or error message in these cases. Avoid a separate decorative container that would remain visible when the widget hides.
Host container
The widget sizes itself from its content and does not set a height on its parent. Place it in a container that fits it:- Use a wrap-content container, or give the container a minimum height that fits the widget. A shorter container clips the cards, starting with the reaction and comment counts at the bottom.
- Avoid a container with zero or undefined height. The widget still loads posts and reports its impression, but readers can’t see it.
- Place the widget in a vertically scrolling or non-scrolling container. A horizontally scrolling parent is not supported, because the widget’s own horizontal scrolling competes with it for swipes.
Supported content
Unsupported posts do not count toward the visibility threshold. For example, a response with four posts, including two unsupported posts, has only two renderable posts and remains hidden at the default threshold.
Each card shows author and community information, a content preview, and reaction and comment counts. A card is one tap target: mentions, hashtags, links, and preview labels do not have separate actions. Media does not play inside the card, and readers cannot vote in a poll preview.
Handle card selection
UseonCardClick for navigation specific to one placement. For app-wide navigation, override the platform’s behavior class instead:
When
onCardClick is provided, the behavior class is not called for that instance.
No platform has a default destination. If you provide neither
onCardClick nor a behavior override, selecting a card does nothing. Provide a navigation handler so a card opens the intended content.