GraphProductFeedRulesEdge
GET /v19.0/{product-feed-id}/rules 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(
'/{product-feed-id}/rules',
'{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(
"/{product-feed-id}/rules",
function (response) {
if (response && !response.error) {
/* handle the result */
}
}
);
/* make the API call */
new GraphRequest(
AccessToken.getCurrentAccessToken(),
"/{product-feed-id}/rules",
null,
HttpMethod.GET,
new GraphRequest.Callback() {
public void onCompleted(GraphResponse response) {
/* handle the result */
}
}
).executeAsync();
/* make the API call */
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]
initWithGraphPath:@"/{product-feed-id}/rules"
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
": {} }
data
paging
Error | Description |
---|---|
100 | Invalid parameter |
rules
edge from the following paths: Parameter | Description |
---|---|
attribute string | The attribute to which the rules are going to be applied. Its value maps to the the property we are going to transform. Required |
params dictionary { string : <string> } | Specifies the parameters which are going to be used as the input of the rule. |
rule_type enum{mapping_rule, value_mapping_rule, letter_case_rule, fallback_rule, regex_replace_rule} | A type of a rule. Defines the operation that is going to be applied to the attribute. Required |
id
in the return type.id
: numeric string, Error | Description |
---|---|
100 | Invalid parameter |
200 | Permissions error |