I noticed Spark AR has a live streaming module Is there a way to simulate or test live reactions and comments without having to go live on facebook?
I would like to test if the following code actually works but I don't want to test it live on my facebook account and ask people to react and comment on the stream.
const LiveStreaming = require('LiveStreaming');
const Scene = require('Scene');
const matchCounterText = Scene.root.find('text1');
const comments = LiveStreaming.comments;
const matchStrings = ['cat','dog'];
const isCaseSensitive = false;
var leadingCount = 0;
comments.startMatchCounter(matchStrings,isCaseSensitive).subscribe(
function(result) {
for (var key in result) {
if (result[key] > leadingCount) {
matchCounterText.text = key;
leadingCount = result[key];
}
}
});