A while ago, I used to take the friends of mine using Graph API in this way (using Graph API Explorer):
/me/friends
Everything was perfect but now, with 2.0 version, I saw that this way does not function for friends who didn't use (via Facebook Login) the app making the request and, if I switch Graph API Explorer to 1.0 version, it functions.
So, how can I do the same thing with the 2.0 version?
API Version Deprecations: As part of Facebook's Graph API and Marketing API, please note the upcoming deprecations: August 3, 2021: Graph API v3. 3 will be deprecated and removed from the platform. August 25, 2021 Marketing API v9.
In the newest version of the Graph API (v2. 9), we're announcing features that simplify development, making it even easier to build apps and experiences with Facebook. We're providing free access to over 140 million places around the world, the same data that powers Facebook, Instagram, and Messenger.
In v2.0 of the API, /me/friends
returns friends who also have logged into the app.
Apps created on or after April 30th 2014 must use Graph API v2.0; they're not able to call Graph API v1.0.
For apps which were active before April 30th, these apps can call either Graph API v2.0 or Graph API v1.0, but Graph API v1.0 will be deprecated on April 30th 2015.
Note that if a user logs into an app via v2.0, and you call /v1.0/me/friends
, this will still only return app-using friends.
If you want to access non-app-using friends in the case where you want to let your users tag people in stories you publish to Facebook, you can use the /me/taggable_friends
API.
In the case where you want to invite people to use your app, Games can use the /me/invitable_friends
endpoint in order to render a custom invite selector. The tokens returned by this API can then be used in the Requests Dialog. See https://developers.facebook.com/docs/games/invitable-friends/v2.0 and https://developers.facebook.com/docs/games/requests/v2.0
For non-games wanting allow people to invite friends to use an app, you can still use the Send Dialog on Web or the Message Dialog on iOS and Android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With