Graph API Version

Business Unit Sources

Reading

BusinessUnitSources

Example

Graph API Explorer
GET /v5.0/{business-unit-id}/sources 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-unit-id}/sources',
    '{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-unit-id}/sources",
    function (response) {
      if (response && !response.error) {
        /* handle the result */
      }
    }
);
/* make the API call */
new GraphRequest(
    AccessToken.getCurrentAccessToken(),
    "/{business-unit-id}/sources",
    null,
    HttpMethod.GET,
    new GraphRequest.Callback() {
        public void onCompleted(GraphResponse response) {
            /* handle the result */
        }
    }
).executeAsync();
// For more complex open graph stories, use `FBSDKShareAPI`
// with `FBSDKShareOpenGraphContent`
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
                               initWithGraphPath:@"/{business-unit-id}/sources"
                                      parameters:params
                                      HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection,
                                      id result,
                                      NSError *error) {
    // Handle the result
}];
If you want to learn how to use the Graph API, read our Using Graph API guide.

Parameters

ParameterDescription
filter_by
JSON-encoded string

filter_by

metric_scope
JSON object

metric_scope

date_range

filters
dictionary { enum {CLICK_LOOKBACK_WINDOW, LOOKBACK_WINDOW, VERSION_ID, VIEW_LOOKBACK_WINDOW, VISIT_CONFIGURATION} : <string> }
Default value: {}

should_include_prior_period
boolean
Default value: false

time_period
enum {ALL_AVAILABLE, ALL_DATES, CUSTOM, DATE_RANGE, FIFTEEN_DAYS, LAST_FOURTEEN_DAYS, LAST_HUNDRED_FOURTY_FOUR_HOURS, LAST_MONTH, LAST_NINETY_DAYS, LAST_QUARTER, LAST_SEVEN_DAYS, LAST_SIXTY_DAYS, LAST_THIRTY_DAYS, LAST_TWENTY_FOUR_HOURS, LAST_YEAR, MONTH_TO_DATE, QUARTER_TO_DATE, SEVEN_DAYS, THIRTY_DAYS, THIS_MONTH_WHOLE_DAYS, TODAY, WEEK_TO_DATE, YEAR_TO_DATE, YESTERDAY}
Default value: all_dates

metric_context
JSON object

business_unit_id
string

business_unit_id

active_pane
string

active_pane

order_by
JSON-encoded string

order_by

Fields

Reading from this edge will return a JSON formatted result:

{ "data": [], "paging": {}, "summary": {} }

data

A list of AtlasPublisher nodes.

paging

For more details about pagination, see the Graph API guide.

summary

Aggregated information about the edge, such as counts. Specify the fields to fetch in the summary param (like summary=count).

FieldDescription
count
unsigned int32

count

metric_date_range
AtlasMetricDateRange

metric_date_range

Creating

You can't perform this operation on this endpoint.

Updating

You can't perform this operation on this endpoint.

Deleting

You can't perform this operation on this endpoint.