You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
I came across several issues getting this to work today:
faceplate index.js passes the error as the first param to the callback e.g.
this.me = function(cb) {
if (self.token) {
self.get('/me', function(err, me) {
console.log('get fb user: ' + JSON.stringify(me) + ', err: ' + err);
cb(err,me);
});
} else {
console.log('error get fb user no token');
cb(null,null);
}
};
but in web.js it has:
req.facebook.me(function(user) {
when should be
req.facebook.me(function(err, user) {
same issue applies to get and fql calls in handle_facebook_request
Also it looks like the data object that faceplate returns in the success callback for the get request stores the friends in a field called data so where faceplate calls the callback like this:
function(cb) {
// query 4 friends and send them to the socket for this socket id
req.facebook.get('/me/friends', { limit: 4 }, function(err, friends) {
req.friends = friends.data;
cb();
});
},
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I came across several issues getting this to work today:
faceplate index.js passes the error as the first param to the callback e.g.
this.me = function(cb) {
if (self.token) {
self.get('/me', function(err, me) {
console.log('get fb user: ' + JSON.stringify(me) + ', err: ' + err);
cb(err,me);
});
} else {
console.log('error get fb user no token');
cb(null,null);
}
};
but in web.js it has:
req.facebook.me(function(user) {
when should be
req.facebook.me(function(err, user) {
same issue applies to get and fql calls in handle_facebook_request
Also it looks like the data object that faceplate returns in the success callback for the get request stores the friends in a field called data so where faceplate calls the callback like this:
request.on('success', function(data) {
cb(null, data);
});
in web.js to get friends would be:
function(cb) {
// query 4 friends and send them to the socket for this socket id
req.facebook.get('/me/friends', { limit: 4 }, function(err, friends) {
req.friends = friends.data;
cb();
});
},
The text was updated successfully, but these errors were encountered: