scottgarner / Heat

Front end effects viewer for Heat.
27 stars 2 forks source link

Accessing real Twich user Ids instead of opaque ids #2

Open AdelaFoofur82 opened 3 years ago

AdelaFoofur82 commented 3 years ago

HI! Great extension. Have you planned to make the twitch real user id info available to the click data? For certain gamification it would be great to have info of who actually is the one who is clicking. Sure I can work things out (Asking user by user to click on certain point of the screen to capture who is who) but it would be really useful to have that information already on the event object. Thanks for your work.

OikoumE commented 2 years ago

https://github.com/scottgarner/Heat/blob/3c086f11d7c935714d2fa4ba2be3518cd5bbd0bd/js/heat.js#L55

getUserById does exactly that for you btw :D

AdelaFoofur82 commented 2 years ago

No, it doesn't. The ids given by your extension are opaque, and cannot be assigned to a real twitch user.

OikoumE commented 2 years ago

then the user/viewer hasnt authorized with the extension allowing for twitch to share their ID. image

when a user have authorized Heat to get their ID, getUserById() does return a username

(its also not my extension, i just saw you question and have an aswer :D )

AdelaFoofur82 commented 2 years ago

Ah I see. The extension doesn't ask for permission, but you can grant it anyway. The streamer has to tell the viewers to grant the access. Thanks.

AdelaFoofur82 commented 2 years ago

https://github.com/scottgarner/Heat/blob/3c086f11d7c935714d2fa4ba2be3518cd5bbd0bd/js/heat.js#L55

getUserById does exactly that for you btw :D

BTW, At the end of february the Kraken API will be shut down. You should change to helix

OikoumE commented 2 years ago

Ah I see. The extension doesn't ask for permission, but you can grant it anyway. The streamer has to tell the viewers to grant the access. Thanks.

Correct :) No problem :)

https://github.com/scottgarner/Heat/blob/3c086f11d7c935714d2fa4ba2be3518cd5bbd0bd/js/heat.js#L55

getUserById does exactly that for you btw :D

BTW, At the end of february the Kraken API will be shut down. You should change to helix

i have made a separate issue for that :D

https://github.com/scottgarner/Heat/issues/6