First and foremost, thank you for the awesome plugin! I …
First and foremost, thank you for the awesome plugin!
I have seen this same asked quite many times but haven’t seen a solution that actually worked. Yes it’s about sharing quiz results in FB. I added the FB APP ID but when I finish the quiz the FB share is just a button with no link in it. There is a big chance that I have my FB APP set up wrong cause FB keeps changing these things so often. Any help would be appreciated as I am hoping to get the quizzes live as soon as possible.
This thread has been imported from harmonicdesign.ca/hd-quiz/
can you please send me a link? If you can’t take a look at your browser console once you try and share via facebook. If there are any issues, they should apear after
HD Quiz init. You can access the browser console in most browsers by pressing F12.
https://www.nordicmetal.net/metalquiz/80s-metal-in-finland/ is the link to the quiz.
Thanks for sending the link!
I think I see the problem, but I’m not sure what is causing it at the moment. The issue is that we need to pass along an image for Facebook to use in the post, but your site is not finding a “featured image” on the page.
Are you comfortable modifying the quiz files? If so, I can send you a small update that should get this working for you (at least in part) and allow us to figure out how to permanently fix.
Yes I am comfortable of modifying the quiz files so please do send me the update. Much appreciated 🙂
The first and easist thing to do is to add an image to the “quiz passed” or “quiz failed” sections. This way we will have something to send Facebook. If you don’t want to do that, you can do the following.
./hq-quiz/includes/js/hdq_script.js and on line 583, you will see
hdq_share_image = hdq_featured_image;.
Simply change this to
hdq_share_image = ""; and it should allow you to share the dynamic results. If we confirm that this is working now, then we can look further into dynamically getting an appropriate image from your page.
Alright I added the image on both pass and fail and now it works but it still doesn’t post the results how I did on the quiz. It just shows the basic info and the image of the quiz itself. But now I wonder if there is something in the FB APP itself I have forgotten to use so it allows to post dynamic data.
I’m looking into it and FACEBOOK DEPRECATED ALL OF THIS.
Uhg. Sharing custom content via Facebook might now be literally impossible as they deprecated the ability to share custom images and text.
Looking into work arounds for this. Stay tuned!
I have good news and bad news.
The bad is that it seems to be impossible to send custom images now. So there is no way to have different “pass” or “fail” images, or to set the images from within the quiz itself. The images come from facebook now – they crawl the page and decide on an image themselves based on the Open Graph metadata.
The good news, is that their updated API still has a way to set custom text, so we can still share quiz results.
Please deactivate and delete HD Quiz, the reinstallation from the repository.
Ok that’s great news! If I delete and reinstall HD Quiz I won’t lose the quizzes I have already done right?
As long as you don’t have some other plugin installed that would auto delete data, you’re safe!
If you want to be extra safe, you can export your questions using WordPress’ built int export tool (under tools -> export).
Alright I updated and it seems to work cause if I check the Facebook URL it has the score there but for some reason it doesn’t bring it as text to the share pop-up. I cleared all cache including cloudflare cache but it might be on Facebook end cause I have seen these extremely stubborn caches on FB side. Gonna test it bit further but I think we are getting there 🙂 You are most helpful Dylan I really can’t express how grateful I am.
Unfortunately, I think you are seeing the “best case scenario”. Facebook no longer allows sharing “editable” text (the text that a user can actually change), so I had to use their updated API to send the score as part of the actual share window. Hope this makes sense!
I tested it now on different Facebook account and different browser with every cache removed and it works! I consider this particular case closed and maybe, just maybe there comes a time when we can also do something about the images itself with it comes to sharing.
Thank you Dylan so much! Now I can move on and start releasing my quizzes soon 🙂
If you are enjoying HD Quiz please leave a review here on the official WordPress.org page. HD Quiz is developed by me, just some dude, and is supported and available for free. It may seem dumb, but truly nothing makes me happier than knowing that people are using and loving HD Quiz and my hard work.
This thread has either been marked as complete or has been automatically closed due to inactivity.