Reputation: 1065
I've spent a week trying to figure this out, and I am turning to the experts on Stack Overflow for a little help.
The Concept
I've designed a front-end and a back-end that are relatively separate. Members interact with a Client-side application that runs on Angular4 frameworks. For that, I use the Javascript SDK to control Facebook login. The application does not use Facebook for anything more than login and pixel information, so I request bare minimum permissions (thus bypassing any need for application review also).
On the back-end, I store the facebook ID of the members. The facebook ID is their unique identifier, since not all users will have an email address. If the member has a paid subscription to the site, the backend needs to invite them to a group page that has SECRET privacy setting. Membership to this exclusive group is one of the perks of paid membership.
The Problem
Here's the problem, to send a member invite, I need a CLIENT_TOKEN from a group administrator. OR I need to have a CLIENT_TOKEN for my APP, if the page that is created was created by the app itself.
What I have found
Facebook API documentation on the CLIENT_TOKEN is very sparse. The documentation includes redirects where the user supposedly enters their user-name, password and then, when they return, a CLIENT_TOKEN is passed back with the redirect. However, this does not work for the Backend, because the admin user (me) is not going to be available to interact with the page that is loaded on the redirect.
I thought about creating the group with the APP to utilize the CLIENT_TOKEN that is owned by the APP itself. However, the documentation (current link pointed to by the current API, btw) notes that APP groups are deprecated, so this is not an option.
What I need to know
Here is what I need to know:
1) How do I obtain a CLIENT_TOKEN for my personal user account without being present to authenticate each time it is requested?
2) In addition to the above, do you have any other advice or tips that I might have forgotten to ask about that pertains to programmatically inviting and removing members?
Upvotes: 0
Views: 134
Reputation: 96306
You can not send invite requests for a group to users via API.
That was a feature available specifically for App & Game Groups as well, but is gone with them.
Upvotes: 1