Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Code docs accurate for Facebook? #21

Open
NobodysNightmare opened this issue Oct 31, 2021 · 0 comments
Open

Custom Code docs accurate for Facebook? #21

NobodysNightmare opened this issue Oct 31, 2021 · 0 comments

Comments

@NobodysNightmare
Copy link

Hello,

I am currently trying to implement a custom widget according to the docs at https://github.com/StreamElements/widgets/blob/master/CustomCode.md.

So far accessing data in onSessionUpdate worked fine, e.g.

window.addEventListener('onSessionUpdate', function (obj) {
    obj.detail.session["subscriber-total"].count; // this is the number of Twitch subscribers
});

However, documented Facebook stats do not work that well

window.addEventListener('onSessionUpdate', function (obj) {
    obj.detail.session["supporter-monthl"]; // this is null or undefined
    obj.detail.session["supporter-monthl"].count; // consequently getting the count does not work
});

Anything I am doing wrong on my end? Is the documentation accurate?

As an aside, double-checking the docs I also noticed that both Twitch and Facebook followers are documented as

data["follower-month"]["count"] // Twitch
data["follower-month"]["count"] // Facebook

Is it at all possible counting stats for both services in the same overlay? What I am looking for is a widget that provides an aggregate score across streaming services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant