I'm new to app development, and I've been building a social iOS app that requires sending Facebook invites to join the app. Yesterday's release of Facebook Graph API 2.0 seems to have much stricter requirements on how to invite those not already part of the game. I'm trying to activate me/invitable_friends but I keep getting the same message:
{
"error": {
"message": "(#15) This method is only accessible to Games.",
"type": "OAuthException",
"code": 15
}
Their documentation mentions needing to be a Canvas app, so I added placeholder URL's as Canvas pages. Not sure if that's sufficient.
Admittedly my app is still in sandbox mode so that could be why, though I get the same message when testing with the Graph API application itself. Is it due to being in sandbox mode, or is there something else I need to do? Do all apps now have to be approved by Facebook to integrate their invites?
To use the invitable_friends edge, your app needs to be:
- classified as a 'Game' within your app's settings
- have a Canvas presence - which means enabling the Canvas platform within your app's settings.
The error you're seeing above is because your app is not categorized as a game, not because you're in Development Mode.
来源:https://stackoverflow.com/questions/23412709/new-ios-app-struggling-with-facebook-graph-api-v2-0