The discussion revolves around enabling users to share badges on social media platforms like Facebook and Twitter. foloex initiates the conversation, seeking a way to enhance community engagement by allowing badge sharing. Falco suggests adding og tags to the badges page as a core improvement. 7ev3n contributes by proposing a solution involving badges/show.html.erb and crawlable_meta_data, eventually submitting a pull request that implements the feature. techAPJ confirms the implementation, and erlend_sh recommends starting with a plugin for future development. The feature is now available via commit 402eaaa.
I’m trying to enhance my community activeness. In order to do so, I’d like my members to be able to brag about obtaining a badge on social media. It would reinforce the gamification aspect of the forum and lead the community into wanting to obtain badges, thus increasing the overall activity.
Is there a way to share a badge on social media (mainly facebook and twitter) ? If not, what kind of development would it take to do so ? I’m willing to make a plugin if it’s what it takes.
Yeah, that too, it would be nice to have the icon and description in the metadata. So if I understand you correctly, metadata description should be handled in the core of the forum and the share button should be a plugin, right ?
I believe metadata description to the badges page can be added by making a new view badges/show.html.erb which has crawlable_meta_data as content_for head.
I also changed the show method in badges_controller to render to :show , instead of default/empty .
Am unable to see the changes (og tags) in the local instance of discourse set up using vagrant. I am new to the community and would appreciate help with this!
That is odd. I can see the og (Open Graph) tags just fine on my local dev instance if I create badges/show.html.erb file and removing render "badges/show" in controller.
Perhaps try again, and see index method in CategoriesController for reference implementation?