Open InciteDemocracy opened 7 years ago
@sdotson Sounds like you might have the most experience with this. Does this relate to an app id or a regression since your PR on social buttons was merged https://github.com/ResistanceCalendar/resistance-calendar-frontend/pull/101
Bummer. It looks like Facebook deprecated picture, caption, and description as things we can pass to the share dialogue api: https://developers.facebook.com/docs/apps/changelog#v2_9_90_day_deprecations
Looks like they really want folks to shift to open-graph tags, which has to be implemented server side.
Their API now only lets us specify a quote, url, and hashtag: https://developers.facebook.com/docs/sharing/reference/share-dialog
An argument for an isomorphic app.
Assuming that FB's policy of only allowing the API to give picture, caption, etc via the back end, we could always go with something like https://www.sharethis.com. It generates a pop-up window (as opposed to a modal overlay), but it seems to get the job done on desktop as well as mobile, so perhaps it's more important to make the content sharable than to make things look extra-slick.
Adding Twitter to this issue, since we're also not getting images from Twitter shares. Again, ShareThis would solve this issue with minimal work.
Though React Helmet would work, but that only works for server-side rendered apps. This bit of code might work: https://www.reddit.com/r/reactjs/comments/5j7100/react_dynamic_facebook_sharing_dialogue_question/
u just need to implement the correct meta-tags, on your html!
@albjeremias I don't believe that it would address the issue with the Facebook crawler not being able to find previews of a given page from the website. I think those meta tags help for sharing, which I think is working ok now, but it's for when someone goes into Facebook.com or Twitter.com and attempts to paste a URL from Resistance Calendar. The FB and Twitter crawlers do not execute JavaScript, so there is no way for them to see the JS-generated page content, so there has to be static HTML version of each page (which the end user never sees, of course).
Does that make sense?
no. and if you don't believe what can I say? good luck
Currently FB share window looks like this:
Right now, the most viable solution I've found is to use a service like this one, which will automatically generate a server-side version of each event page which will only be visible to crawlers such as Google, FB, Twitter, etc: https://prerender.io/ - Doron