74 строки
2.4 KiB
JSON
74 строки
2.4 KiB
JSON
{
|
|
"properties": {
|
|
"capabilities": [],
|
|
"connectionParameters": {
|
|
"token": {
|
|
"oAuthSettings": {
|
|
"clientId": "facebook_app_id",
|
|
"customParameters": {},
|
|
"identityProvider": "facebook",
|
|
"properties": {
|
|
"IsFirstParty": "False"
|
|
},
|
|
"redirectMode": "Global",
|
|
"redirectUrl": "https://global.consent.azure-apim.net/redirect",
|
|
"scopes": [
|
|
"pages_show_list", "user_posts", "pages_read_engagement", "pages_read_user_content"
|
|
]
|
|
},
|
|
"type": "oauthSetting"
|
|
}
|
|
},
|
|
"iconBrandColor": "#007ee5",
|
|
"policyTemplateInstances": [
|
|
{
|
|
"parameters": {
|
|
"x-ms-apimTemplateParameter.name": "Accept",
|
|
"x-ms-apimTemplateParameter.value": "application/json",
|
|
"x-ms-apimTemplate-policySection": "Request"
|
|
},
|
|
"templateId": "setHeader",
|
|
"title": "Set HTTP header"
|
|
},
|
|
{
|
|
"parameters": {
|
|
"x-ms-apimTemplate-operationName": [
|
|
"UserTimeline"
|
|
],
|
|
"x-ms-apimTemplateParameter.httpMethod": "@Request.OriginalHTTPMethod",
|
|
"x-ms-apimTemplateParameter.newPath": "/{userId}/feed"
|
|
},
|
|
"templateId": "routerequesttoendpoint",
|
|
"title": "Redirect to users endpoint"
|
|
},
|
|
{
|
|
"parameters": {
|
|
"x-ms-apimTemplate-operationName": [
|
|
"TriggerNewPost"
|
|
],
|
|
"x-ms-apimTemplateParameter.triggerConfig": {
|
|
"since": "@{triggerBody().data[0].created_time}"
|
|
},
|
|
"x-ms-apimTemplateParameter.triggerDataPath": "@triggerBody().data"
|
|
},
|
|
"templateId": "pollingtrigger",
|
|
"title": "Polling trigger for new posts",
|
|
"type": "PollingTrigger"
|
|
},
|
|
{
|
|
"parameters": {
|
|
"x-ms-apimTemplate-operationName": [
|
|
"PostToPage"
|
|
],
|
|
"x-ms-apimTemplateParameter.parameterTemplate": "@queryParameters('access_token')",
|
|
"x-ms-apimTemplateParameter.parameterValueUrl": "/{pageId}?fields=access_token",
|
|
"x-ms-apimTemplateParameter.parameterValuePathTemplate": "@body().access_token",
|
|
"x-ms-apimTemplateParameter.httpMethod": "GET",
|
|
"x-ms-apimTemplate-policySection": "Request"
|
|
},
|
|
"templateId": "SetValueFromUrl",
|
|
"title": "Set access_token for PostToPage"
|
|
}
|
|
]
|
|
}
|
|
} |