Permalink
Browse files

Added Licence to Readme. Removed a swap file.

  • Loading branch information...
1 parent d99a6ab commit a3bdd8fd2a92386b55020b715a7f3a31edf62d1d @vladbagrin committed Oct 9, 2011
Showing with 21 additions and 1 deletion.
  1. +19 −1 Readme.md
  2. BIN lib/.facebook-wrapper.js.swp
  3. +2 −0 lib/facebook-wrapper.js
View
@@ -3,7 +3,7 @@ About
This is a basic wrapper to the Facebook API, designed to work with Connect and
Express in a simple and straightforward manner. I will hopefully add more
-features and make it more robust in time.
+features and make it more robust in time. I will gladly accept contributions.
It was written from scratch, partly inspired by the PHP Facebook API wrapper
written by the developers at Heroku.
@@ -83,3 +83,21 @@ server.post('/*', function (req, res) {
});
server.listen(8000);
```
+
+Licence
+=======
+
+Copyright (C) 2011 Vlad Bagrin
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>.
Binary file not shown.
View
@@ -94,6 +94,7 @@ function getSignedRequest(req) {
var data = null;
if (req.body !== undefined && req.body['signed_request'] !== undefined) {
data = req.body['signed_request'];
+ console.log(data);
} else if (req.cookies != undefined) {
// I have little to no idea how this cookie will look like
console.log('Got cookie: ' + JSON.stringify(req.cookie, null, ' '));
@@ -112,6 +113,7 @@ function parseSignedRequest(payload_string) {
payload = payload_string.split('.');
var sig = payload[0];
var data = JSON.parse(new Buffer(payload[1], 'base64').toString());
+ console.log(JSON.stringify(data, null, ' '));
if (data['algorithm'].toUpperCase() !== 'HMAC-SHA256') {
console.log('Unknown signed_request hash algorithm: ' + data['algorithm']);

0 comments on commit a3bdd8f

Please sign in to comment.