I've got an iOS app using Corona(ie. in LUA; not ObjectiveC; though I'm not requesting specific Corona help, just how to do this in general) that I want to add or invite users of the app to the Facebook group. I've had success with members of the group posting to the group's wall from my app, but can't for the life of me get the "Invite Users" bit of code to work for people who aren't yet members of the FB group.
All of the posts on this website say it either can't be done (presumably because they're from before the Groups API was available) or just repeat what the Facebook documentation says (which I've read a million times, but maybe don't fully understand).
From Facebook's Group documentation (https://developers.facebook.com/docs/reference/api/group/)...
"Applications can invite users to a group by issuing a POST request to /GROUP_ID/members/USER_ID with an app access_token."
After figuring out how to get the app access_token (as opposed to the user access_token), I've tried using 3 different methods to test this out; Corona's facebook API request() command, making a PHP page with the command, and even tried Facebook Graph Explorer to try this code and nothing works.
All of them along the lines of... https://graph.facebook.com/myGroupID/members/nonMemberFBUserID?access_token=myAppsAppToken
Corona gives me an HTTP 200(which should mean OK) but the facebook request returns an error (I've got a question in their forum, but I don't often get much help from them). My website PHP page returns an empty data object ala: "{\"data\":[]}"
. And the Facebook Graph Explorer just lists all of the existing members along with some cryptic "paging" object with a "next" web address in it. If I go to this address directly, it says:
{
"error": {
"message": "An access token is required to request this resource.",
"type": "OAuthException",
"code": 104
}
}
But I passed an access_token as a parameter! Does this mean I also need to pass a user access_token? And if so, what do I call it, if the access_token variable is already used for the app's access_token?