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

Add support for new messenger 2.0 profile home_url #793

Merged
merged 4 commits into from
Apr 26, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions lib/Facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,18 @@ function Facebookbot(configuration) {
get_domain_whitelist: function(cb) {
facebook_botkit.api.messenger_profile.getAPI('whitelisted_domains', cb);
},
home_url: function(payload) {
var message = {
home_url: payload
};
facebook_botkit.api.messenger_profile.postAPI(message);
},
delete_home_url: function() {
facebook_botkit.api.messenger_profile.deleteAPI('home_url');
},
get_home_url: function(cb) {
facebook_botkit.api.messenger_profile.getAPI('home_url', cb);
},
postAPI: function(message) {
request.post('https://graph.facebook.com/v2.6/me/messenger_profile?access_token=' + configuration.access_token,
{form: message},
Expand Down