Skip to content

Commit a9d7796

Browse files
committed
Adding access public data by user id
1 parent 3f5d897 commit a9d7796

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/test_access_public.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,22 @@ describe('Accessing public data', function(){
2020
});
2121
});
2222
});
23+
24+
describe('Calling .graph with /4 without access_token', function(){
25+
it('should return public info about Mark Zuckerberg', function(done) {
26+
var fb = new fbgraphapi.Facebook(null);
27+
fb.graph('/4', function(err, res) {
28+
expected = { id: '4',
29+
first_name: 'Mark',
30+
gender: 'male',
31+
last_name: 'Zuckerberg',
32+
link: 'https://www.facebook.com/zuck',
33+
locale: 'en_US',
34+
name: 'Mark Zuckerberg',
35+
username: 'zuck' };
36+
assert.deepEqual(res, expected);
37+
done();
38+
});
39+
});
40+
});
2341
});

0 commit comments

Comments
 (0)