Get event source groups owned by this business.
GET /v21.0/{business-id}/event_source_groups 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(
'/{business-id}/event_source_groups',
'{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(
"/{business-id}/event_source_groups",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{business-id}/event_source_groups",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{business-id}/event_source_groups"
parameters:params
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
id result,
NSError *error) {
// Handle the result
}];
このエッジからの読み込むではJSONフォーマットの結果が返されます:
{ "
data
": [], "paging
": {} }
data
paging
エラー | 詳細 |
---|---|
270 | This Ads API request is not allowed for apps with development access level (Development access is by default for all apps, please request for upgrade). Make sure that the access token belongs to a user that is both admin of the app and admin of the ad account |
100 | Invalid parameter |
200 | Permissions error |
event_source_groups
のエッジにPOSTリクエストを以下のパスで送信できます: パラメーター | 説明 |
---|---|
event_sources list<numeric string or integer> | Event sources associated with this event source group, such as IDs for pixels. 必須 |
name UTF-8 encoded string | Name of the event source group. 必須 |
id
によって表されたノードを戻り値の型で読み込みます。id
: numeric string, エラー | 詳細 |
---|---|
100 | Invalid parameter |