I have a JS wep app & Parse.com backend which I would like to hook up to Facebook using Opengraph actions. Problem is being a web app, it's not possible to manipulate the meta tags in such a way so that the Facebook scraper will use it.
Most solutions point to having a server side implementation running alongside your web app. Having read a little about Node.js...I think there could be another way and I was wondering if Node.js experts could shed some light.
Would it be possible to use Node.js to query my Parse.com DB based on URL parameters in order to serve up the proper meta tags? And would it be quick enough a solution?
Something like
- Request comes in - 'xxx.com/user/1234'
- Node queries Parse.com DB with user=1234
- Parse returns the information for meta tags
- Node serves up HTML page with the correct meta tags
- Web app runs as normal
Thanks in advance for contemplating this question.
You can absolutely do this. To set up a simple webserver with node.js, you can follow the simple example on their homepage.
To communicate with Parse from node.js, you can use the Parse JavaScript SDK, available through through npm.
http://blog.parse.com/2012/10/11/the-javascript-sdk-in-node-js/