Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hughsk/likegate
Small server-side validation/info for Facebook canvas apps.
https://github.com/hughsk/likegate
Last synced: 8 days ago
JSON representation
Small server-side validation/info for Facebook canvas apps.
- Host: GitHub
- URL: https://github.com/hughsk/likegate
- Owner: hughsk
- Created: 2012-04-05T05:12:08.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2012-04-10T05:16:22.000Z (over 12 years ago)
- Last Synced: 2024-10-17T16:39:18.201Z (22 days ago)
- Language: JavaScript
- Homepage:
- Size: 89.8 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# likegate
Small server-side validation/info for Facebook canvas apps.
*Note: doesn't currently validate whether the request if from within Facebook or not, will be adding this soon though.*
## Installation
npm install likegate
## Usage
``` javascript
var gate = require('likegate');http.createServer(function(req, res) {
if (req.method == 'POST') {
gate(req, function(err, fields) {
console.log(fields.page.liked); // `true` if the user has liked the page
console.log(fields.page.admin); // `true` if the user is an admin
});
} else {
res.end('Should be a POST request');
}
});
```