Learn R Programming

rfacebookstat (version 1.8.3)

fbDeleteAdAccountUsers: Delete users from ad accounts.

Description

fbDeleteAdAccountUsers is method for remove users access from ad accounts.

Usage

fbDeleteAdAccountUsers(user_ids = NULL, 
                       accounts_id = NULL,
					   api_version = "v3.1",
					   access_token = NULL)

Arguments

accounts_id

vector with ID of your ad account, for example c("act_00001","act_00002").

access_token

Your facebook API token.

user_ids

vector with users ids who need remove from ad account.

api_version

Current Facebook API version.

Details

ads_management permission is required. You need 'Administrator' access to the ad account to remove users

Examples

Run this code
# NOT RUN {
#Attach package
library(rfacebookstat)
#Get token, where 0000000000000 is id of your app in facebook
tk <- fbGetToken(0000000000000) 
#Remove user with id 001 and 002 from accounts act_0001 and act_0002
fbDeleteAdAccountUsers(user_ids = c(001,002), 
                       accounts_id = c("act_0001","act_0002"), 
                       api_version = "v2.12",
                       access_token = "abcdef123456" )
# }

Run the code above in your browser using DataLab