Facebook sharer and prerender.io (in angularjs app)

I just installed prerender.io middlewave on my tomcat server (running some java web services and angularjs application).

The service (prerender) works as it should, and I can see the pages adding to the list (also when I submit a simulation of a user agent request).

My problem is with the Facebook share button (from addthis).

Basically, if I’m on a page that is not yet cached and click on the “Share to Facebook” button, it will show me the angularjs template, and not the “rendered” one.

It is strange that I can see the page on Prerender.io admin.

He likes it too slowly, and from time to time. However, I do not know how to get an unencrypted version of the page.

After the first incorrect call, Facebook caches the page, so if I do not manually refresh it using the Facebook object debugger ( https://developers.facebook.com/tools/debug/og/object ), the wrong page will remain cached on the FB servers until those until the FB cache is updated.

Anyway, is there any suggestion on how to fix this?

I could pre-cache every page, but I will have to deal with new pages, and I do not think this is a good solution.

thanks, Dem

+7
javascript angularjs facebook facebook-sharer prerender
source share
1 answer

I have the same problem and it still bothers me.

What you can do is create your own page (as a rule, your user will save something), then you can create a server call to preview your page. After a while (for example, 1 min) you can call another facebook call to refresh its cache ...

The only problem with this, it only works after a couple of minutes ... :(

+1
source share

All Articles