Updated Facebook sample
This commit is contained in:
gijeyaku 2019-10-08 11:18:16 -07:00 коммит произвёл Mahbub Murshed
Родитель 0e3597bbb3
Коммит d326e77e20
3 изменённых файлов: 1344 добавлений и 331 удалений

Просмотреть файл

@ -11,20 +11,22 @@
```
4. Use CLI tool `paconn` to create a new custom connector.
5. On Facebook developer dashboard update 'Valid OAuth Redirect URIs' under Products >> Facebook Login >> Settings.
You can find the redirect URI on security page of your custom connector.
5. On Facebook developer dashboard update 'Valid OAuth Redirect URIs' under Products >> Facebook Login >> Settings. You can find the redirect URI on security page of your custom connector.
## Supported Triggers
As part of this sample following triggers are supported:
* `When there is a new post on my timeline`: Triggers a new flow when there is a new post on your timeline. It is possible for this trigger to not activate for all posts since detection of a post must pass several privacy checks including a person's privacy settings on Facebook.
## Supported Actions
As part of this sample following actions are supported:
* `Get my Pages`: Lists all the pages that you own.
* `Get my feed`: Get the feed from your timeline.
* `Get feeds from my timeline`: Gets feed of posts from your timeline.
* `Get page access token`: Get a page access token for a page you own.
* `Get Page Feeds`: Gets feed of posts from a page
* `Get page feed`: Get posts from the feed of a specified page.
* `Post to my page`: Post a message to a page that you own.
This operation requires page access token, which can be retrieved by `Get page access token` action.
* `Get user timeline`: Get posts from a user's timeline.

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -13,12 +13,62 @@
"redirectMode": "Global",
"redirectUrl": "https://global.consent.azure-apim.net/redirect",
"scopes": [
"user_posts publish_pages publish_to_groups"
"user_posts publish_pages"
]
},
"type": "oauthSetting"
}
},
"iconBrandColor": "#007ee5"
"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"
}
]
}
}