How to invite a user to join a business account via Facebook API?

55 views Asked by At

I want to invite a user to join my facebook business account via facebook graph api v18.

Based on facebook documentation I send a POST request to:

`curl \
\-F "[email protected]" \
\-F "role=EMPLOYEE" \
\-F "access_token=\<ACCESS_TOKEN\>" \
"https://graph.facebook.com/\<API_VERSION\>/\<BUSINESS_ID\>/business_users"`

As a response from facebook I get:

`{
"error": {
"message": "Application does not have permission for this action",
"type": "OAuthException",
"code": 10,
"error_data": {
"hash": null
},
"error_subcode": 2859030,
"is_transient": false,
"error_user_title": "This Action Is Not Allowed",
"error_user_msg": "Please retry this action in a few minutes",
"fbtrace_id": "ARd4Uo9qXazGt-ksdrg4kUV"
}
}`

The app I am using has advanced access of business_management permission. Also, I am able to invite a user to the business account directly from facebook interface, which means that my user has the right permissions to execute this action.

If anyone have any solutions please let me know.

Any help would be greatly appreciated!

0

There are 0 answers