Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Add documentation of the home_url messenger_profile api
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgillies committed Apr 23, 2017
1 parent 3c24869 commit 29816d6
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docs/readme-facebook.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,23 @@ Remove all domains

Get a list of the whitelisted domains.

### controller.api.messenger_profile.home_url()
| Argument | Description
|--- |---
| payload | A home_url object with the properties `url`, `webview_height_ratio`, `in_test`

View the facebook documentation for details of the [home_url](https://developers.facebook.com/docs/messenger-platform/messenger-profile/home-url) payload object.

*NB.* The value of the `url` property must be present in the domain_whitelist array

### controller.api.messenger_profile.delete_home_url()

Remove the home_url setting

### controller.api.messenger_profile.get_home_url()

Get the home_url

#### Using the The Messenger Profile API

```js
Expand Down Expand Up @@ -451,6 +468,17 @@ controller.api.messenger_profile.get_domain_whitelist(function (err, data) {
console.log('****** Whitelisted domains :', data);
});

controller.api.messenger_profile.home_url({
"url": 'https://mydomain.com',
"webview_height_ratio": 'tall',
"in_test": false
})

controller.api.messenger_profile.get_home_url(function (err, data) {
console.log('****** Home url :', data);
});

controller.api.messenger_profile.delete_home_url();

controller.hears(['hello'],'facebook_postback', function(bot, message) {
//...
Expand Down

0 comments on commit 29816d6

Please sign in to comment.