UserAdStudies
GET /v26.0/{user-id}/ad_studies HTTP/1.1
Host: graph.facebook.com/* PHP SDK v5.0.0 */
/* make the API call */
try {
// Returns a `Facebook\FacebookResponse` object
$response = $fb->get(
'/{user-id}/ad_studies',
'{access-token}'
);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
echo 'Graph returned an error: ' . $e->getMessage();
exit;
} catch(Facebook\Exceptions\FacebookSDKException $e) {
echo 'Facebook SDK returned an error: ' . $e->getMessage();
exit;
}
$graphNode = $response->getGraphNode();
/* handle the result *//* make the API call */
FB.api(
"/{user-id}/ad_studies",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{user-id}/ad_studies",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{user-id}/ad_studies"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];Reading from this edge will return a JSON formatted result:
{ "
data": [], "paging": {}, "summary": {} }
datapagingsummaryAggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=total_count).
| Field | Description |
|---|---|
total_countunsigned int32 | Total number of lift studies for this person |
| Error | Description |
|---|---|
| 190 | Invalid OAuth 2.0 Access Token |
ad_studies edge from the following paths: | Parameter | Description |
|---|---|
cellslist<Object> | A shape to describe the cells of the study |
client_businessnumeric string or integer | Business associated with study |
confidence_levelfloat | Confidence level used in power calculation and final report |
cooldown_start_timeinteger | The beginning of the pre measurement cooldown period. This period ends when the study period starts. |
creative_test_configJSON object | (Optional) Configuration for launching a 2-5 cell creative test. Specify either daily_budget or lifetime_budget_percentage to set the budget allocation for the study across the cells' ads. Study "type" field must be defined as SPLIT_TEST_V2 when creative_test_config is included in the request. |
descriptionstring | A brief description about the purpose of the study. |
end_timeinteger | The time when the study period ends. |
namestring | The name of the study. |
objectiveslist<Object> | A vector of objects describing the objectives assigned to this study |
observation_end_timeinteger | The end of the observation period for this study, this period starts when the study period ends. |
start_timeinteger | The time when the study period starts. |
typeenum {LIFT, SPLIT_TEST, CONTINUOUS_LIFT_CONFIG, GEO_LIFT, BACKEND_AB_TESTING, CREATIVE_SPEND_ENFORCEMENT, PORTFOLIO_OPTIMIZER, VERSION_CONTROL} | The type of ad study, either SPLIT_TEST or LIFT. |
viewerslist<int> | The list of people who this study has been shared with. |
id in the return type.id: numeric string, cell_ids: List [objective_ids: List [| Error | Description |
|---|---|
| 100 | Invalid parameter |
| 200 | Permissions error |