Thuzi / facebook-node-sdk

Modeled from the (Facebook Javascript SDK), now with the facebook-node-sdk you can now easily write the same code and share between your server (nodejs) and the client (Facebook Javascript SDK).
Other
737 stars 250 forks source link

FB.api('me/friends',... return res.error that is an empty object for all calls #84

Closed mclark4386 closed 9 years ago

mclark4386 commented 9 years ago

Is this a known issue? What can I do to fix/debug this?

mclark4386 commented 9 years ago

oh, also tried FB.api('/v2.0/me/friends',... as well

mclark4386 commented 9 years ago

Oh also the FB developer app interface shows all the calls, but no errors... so not sure what's going on.

cmwelsh commented 9 years ago

The API changed to only show friends that are also authenticated with the application. It's not possible to retrieve this information anymore.

mclark4386 commented 9 years ago

I was using this to make a list to check for friends that are in our system already as well as to allow them to invite friends... any suggestions?

cmwelsh commented 9 years ago

Use the invitable friends API:

https://developers.facebook.com/docs/graph-api/reference/v2.2/user/invitable_friends https://developers.facebook.com/docs/games/invitable-friends/v2.2

Note that it will not return user IDs, just an anonymized token you can pass into the invite friend dialog.

mclark4386 commented 9 years ago

Awesome! Thanks! So I notice that the friends API should still work, but only return friends that have used the app ( https://developers.facebook.com/docs/graph-api/reference/v2.2/user/friends ). That said I'm still getting nothing but an error with an empty object in it... is this a bug I should look into fixing or is this a result I'm simply miss interrupting in some way? Again this happens in both the case that I know I'm sending the api bad data AND when I'm sending it data that has always been good before, both give the error with an empty object. ("data" being tokens, etc)

mclark4386 commented 9 years ago

Also if I make the same graph call with the same access token via the Graph API Explorer it works perfectly.

cmwelsh commented 9 years ago

Perhaps I misunderstood your issue. I am using friends and invitable_friends successfully in this application I made last week:

https://github.com/cmwelsh/facebook-friend-list

mclark4386 commented 9 years ago

I actually can't seem to make any calls without getting an empty error object... tried all variations of 'me' I can think of as well, and can't get a coherent response from any of them. I'm guessing that it's something I've done wrong up the line in the FB app settings or something, but with out any sort of error message it's going to be near impossible unless I just luckily flip the right switch somewhere...

mclark4386 commented 9 years ago

Seems you have to throw the error to see the contents and the error has to do with the server's setup. Thanks for your time!