The Official Account following component. You can add this component to a Mini Program, to help a user conveniently follow an Official Account after the user opens the Mini Program by scanning the Mini Program code. This component can be nested into a native component.
Before using this component, you need to go to Mini Program Console, and choose Settings > API Settings > Official Account Following Component to set the Official Account to be displayed. Note: The Official Account and the Mini Program must belong to the same entity.
During the lifecycle of a Mini Program, the capability of displaying the Official Account following component is available only when the Mini Program is opened in any of the following scenarios:
The Mini Program is opened by scanning the Mini Program code (scene value 1047).
When the Mini Program is opened from Recently Used at the top of the Chats screen (scene value 1089), if the Mini Program is not destroyed, the component remains in the same state as that when the Mini Program was last opened.
When returning to the Mini Program from another Mini Program (scene value 1038), if the Mini Program is not destroyed, the component remains in the same state as when the Mini Program was opened last time.
The minimum width of the component is limited to 300 px and the height is fixed at 84 px.
Each page can include only one Official Account following component.
|onLoad||No||Triggered when the component is loaded successfully.|
|onError||No||Triggered when the component fails to be loaded.|
|Property||WeChat Mini-Program||H5||React Native|
Valid values of status
|-1||Data parsing error|
|1||The Official Account following feature in the Mini Program is suspended|
|2||Linked Official Account is suspended|
|3||The Official Account is unlinked or not selected|
|4||The Official Account following feature is disabled|
|5||Scene value error|
|API||WeChat Mini-Program||H5||React Native|