Share quiz results on social media

Hello,

We are going to be publishing some public quizzes and I was wondering if there is a way to offer to the user to share his results on Twitter / Facebook / Linkedin / other?

Thanks,
Michael

Hi Michael,

It depends on the LMS that you use to publish quizzes on. But normally it’s not possible or hard to do that.

Regards,

Hi Hang,
In fact this should be directly an HTML5 on a webpage. Does that make it any easier?
for example, imagine some share buttons on the last page of - The transport mode game - Learn with Allyn International!
Thanks,
Michael

Hi Michael,

Please take a look at this tutorial Simple Dynamic Social Media Share Links On the Same Page | fjorge

The tutorial guides you on how to share different content on a single page. I’ve not tested this so not sure if it can work properly. Please try it yourself.

Regards,

Hi,
thanks for the link. A bit out of my comfort zone, but I will give it a try.
Thanks a lot,
Michael

1 Like

Hi,
I was not able to use the tutorial you provided directly but it did put me in the write direction -
I now have share buttons which work for FB, Reddit and Twitter and one (with no results / comment added) for Linkedin.
I have 4 objects with an onClick javascript and thought I would share the code here for future reference:

//Twitter

var url = “https://allynintlcatalog.trainlearngrow.com/the-transport-mode-game/”;
var text = "I just scored " + prez.variable(‘apQuizCorrectInteractions’) + " out of " + prez.variable(‘QuestionID’) + “, in this transport mode selection game. #logistics #training @grow_train @allynintl”;
window.open('http://twitter.com/share?url=‘+encodeURIComponent(url)+’&text='+encodeURIComponent(text), ‘’, ‘left=0,top=0,width=550,height=450,personalbar=0,toolbar=0,scrollbars=0,resizable=0’);

//Facebook

var currentDomain = “https://allynintlcatalog.trainlearngrow.com/the-transport-mode-game/”;
var title = "I just scored " + prez.variable(‘apQuizCorrectInteractions’) + " out of " + prez.variable(‘QuestionID’) + “, in this transport mode selection game. @logisticselearning
window.open('https://www.facebook.com/sharer/sharer.php?u=’ + currentDomain + ‘&quote=’ + title, ‘_blank’);

//Reddit

var currentDomain = “https://allynintlcatalog.trainlearngrow.com/the-transport-mode-game/”;
var title = "I just scored " + prez.variable(‘apQuizCorrectInteractions’) + " out of " + prez.variable(‘QuestionID’) + “, in this transport mode selection game.”
window.open(‘https://reddit.com/submit?url=’ + currentDomain + ‘&title=’ + title, ‘_blank’);

//Linkedin (no comments / variables included — just a link)

var url = "https://allynintlcatalog.trainlearngrow.com/logistics-training-game/";
window.open(‘LinkedIn Login, Sign in | LinkedIn’);

and finally to prepare an email

var currentDomain = "https://allynintlcatalog.trainlearngrow.com/the-transport-mode-game/";
var title = “Transport mode selection game”;
var txt = "I just scored " + prez.variable(‘apQuizCorrectInteractions’) + " out of " + prez.variable(‘QuestionID’) + “, in this transport mode selection game.”
window.open(‘mailto:?subject=’+title+‘&body=’+currentDomain + txt, ‘_blank’);

This works at time of writing (on chrome), not sure how long it will as they do change their URL calling rules.
Hope it helps,
Regards,
Michael

Hi Michael,

Thank you for sharing your code. It will be very helpful for others.

Sorry for my misunderstanding :slight_smile:.

Regards,

Hi,
no problem. Your answer helped me.
Thanks,