Facebook Open Graph, Share Button, and Prerendering

671 views
Skip to first unread message

David Bethune

unread,
Apr 2, 2016, 1:02:20 PM4/2/16
to Firebase Google Group
I see the issue of prerendering has come up numerous times without a working solution.

What are folks currently doing about Facebook sharing buttons and Open Graph? Has anyone devised a workaround for creating dynamic Open Graph meta tags using Angular and Firebase static hosting? All the solutions I see for rendering meta tags require a prerendering service running Express or another Node server.

Any ideas for us folks on Firebase hosting? What do you do about Facebook sharing?

Thanks!
-- D

Frank van Puffelen

unread,
Apr 3, 2016, 5:07:36 PM4/3/16
to Firebase Google Group

David Bethune

unread,
Apr 4, 2016, 10:48:29 AM4/4/16
to Firebase Google Group
Frank, I'm sorry I fail to see how that's a helpful response. The instructions here to say to post in stackoverflow, yet over there you marked my question as off-topic?

Is this a way of saying that there is intentionally no solution to this problem because you consider Facebook to be "off platform" and there off limits for discussion. I was not aware that Google services and technologies were only offered on an "all or nothing basis." If that's the case, it should be more explicitly documented that you do not intend Google technologies to be used in conjunction with anyone else's.

Telling me that my post is off-topic is just gaming the system and not giving a useful answer.

-- D

Mario Giambanco

unread,
Apr 4, 2016, 6:00:00 PM4/4/16
to Firebase Google Group
I solve this using Apache, MySQL, a bit of PHP and some config rules

In my case, articles (blog posts) are most commonly shared to FB, Twitter, etc...

When a new post is created, I send (http request) it's vitals (title, description, image, url) to a PHP script - this dumps it into a MySQL db.

I have a page on my server - static_page.php that checks the url against the DB and retrieves the proper page information and presents it how FB / Twitter, etc... want it presented

Then, in apache config, I'm checking for user agents (again, for FB, twitter, etc...) and if those appear, to redirect the request to this static_page.php

It's worked well.

Michael Bleigh

unread,
Apr 4, 2016, 6:08:19 PM4/4/16
to Firebase Google Group
This is a feature we'd like to add to Firebase Hosting, but it isn't currently supported and there isn't a real workaround barring Facebook upgrading their crawlers to support JS-in-page.

You can provide coarse-grained tags by using rewrites with some number of base HTML templates, but this is unlikely to serve the needs of dynamic shareable links.

Wish I had a better answer -- we are investigating how to make this story more doable but don't have anything to announce at this time.

-Michael

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/718844fa-3290-451f-9048-ea268d02527a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Bethune

unread,
Apr 9, 2016, 10:38:17 AM4/9/16
to Firebase Google Group
Thank you, Michael, for that reply.

I do understand that Google is hesitant to expend resources on what might be perceived as helping the competition, but I'd like to carry forward the message that, without the ability to promote our apps on the world's most successful social media platform, there will be little incentive to host those apps with you -- even if that other platform is a competitor. With all of Google's resources, this should have been solved a long time ago and the only reason that it isn't is that you are viewing FB as "the enemy" rather than realizing that the success of Firebase apps for those of us who develop them is largely dependent upon that "enemy." 

If Facebook drives traffic to Firebase apps, then they're really helping you -- not hurting you. It's time to press management to invest in that kind of help. This isn't a technical problem. It's a strategic one.

Thanks for listening and being willing to take this feedback up the chain.

-- D

Frank van Puffelen

unread,
Apr 9, 2016, 8:22:52 PM4/9/16
to Firebase Google Group
David,

Thanks for your feedback. We hear you loud and clear. As Michael said, we'd like to add pre-rendering to Firebase Hosting. But we have no timeline for when that may happen. Making assumptions about why this is the case is not helpful to anyone.

If you need pre-rendering today, Firebase Hosting may currently not be a good fit for you. Mario has given his (technically impressive) solution to this accomplish indexing of his dynamic site by all crawlers. I suggest you focus on a similar constructive solution. 

   Frank

Douglas Correa

unread,
May 19, 2016, 9:33:01 AM5/19/16
to fireba...@googlegroups.com
David,

For now, the best Hosting solution for Static Single Page apps is Netlify (https://www.netlify.com/pricing), it supports prerendering out-of-the-box and also provide free ssl for custom domain with one click. So, nowadays, if you depends on SEO and Prerender you choose go with Netlify hosting instead of Firebase hosting.

And, of course, you can fire up one nginx/apache/express/etc server to do the job for you, but if you are looking for "serveless" solution, I prefer Netlify.

Best regards,

Douglass

David Bethune

unread,
May 20, 2016, 10:20:57 AM5/20/16
to Firebase Google Group
Douglass,

Thank you for that. I'll check out the Nelify offering.

I was glad to hear the announcements that Google is continuing to move Firebase forward. It would be great if you could get the prerendering in there, too...

-- D

Dirk Bartels

unread,
Aug 8, 2016, 3:12:08 PM8/8/16
to Firebase Google Group
I would like to support the request for some form or prerender solution that works with Firebase Hosting. This is in discussion now for at least 1.5 years and it is an unacceptable situation because of the limited SEO options with a Firebase hosted web application and the issues around FB sharing as discussed here. We are very happy otherwise with the Firebase Hosting and the Firebase database, however, we will have to look for a different hosting when things do not change relatively soon.

Best

Dirk

Augustin Bralley

unread,
Aug 16, 2017, 10:27:36 AM8/16/17
to Firebase Google Group
This can now be accomplished with Firebase Cloud Functions:

Reply all
Reply to author
Forward
0 new messages