-
Notifications
You must be signed in to change notification settings - Fork 36
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
Integrate social media functionality with sharing microservice #673
Conversation
c4e8d79
to
75df6f4
Compare
@Lukeswart -- curious if you think the strategy of updating social meta tags client-side in this PR is a good idea. I think part of the problem with the social media previews is that the page's meta tags were being generated once by Django on page load, but when a user starts navigating client-side, those meta tags become obsolete. Instead, I think we can just update them on the client whenever anyone clicks a social media sharing button. This also knocks off one to-do on the static site conversion as well. |
75df6f4
to
004e19b
Compare
@goldpbear Yes, I think moving this onto the client is a good idea, and it knocks another TODO off of our static site conversion. But we can't do this entirely on the client via javascript - the twitter/facebook bots don't parse any js - they only read the HTML meta tags that comes back from that link. So we can't simply update the metatags via js. I'm happy to help implement a simple solution for this - it involves creating a separate service that will render the html with the proper meta tags for the bots, whenever someone shares a link. I'm happy to meet up and discuss anytime. It's basically a simplified version of what pre-rendering engines are doing, like this one: https://github.com/prerender/prerender |
Oh, duh. That makes sense. I'll take a look at the prerendering engine... |
e3d3aa4
to
890801e
Compare
890801e
to
316d235
Compare
959b8aa
to
bdab27a
Compare
Addresses: #292, #655
Changes introduced:
place/
dataset slug in a template helper function used for generating Twitter and Facebook sharing urls* Move all social meta tag handling client-side. That way, we can update the content of meta tags as users navigate around the app, instead of relying on the Django-generated tags on page load. This actually addresses a bit of Static site conversion #655