Skip to content

Commit

Permalink
Merge pull request #140 from xjcook/master
Browse files Browse the repository at this point in the history
Update Graph API to 2.12
  • Loading branch information
Charca authored Jul 9, 2018
2 parents d0700a9 + 3403e7c commit 6c9ed93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/BootBot.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class BootBot extends EventEmitter {
sendRequest(body, endpoint, method) {
endpoint = endpoint || 'messages';
method = method || 'POST';
return fetch(`https://graph.facebook.com/v2.6/me/${endpoint}?access_token=${this.accessToken}`, {
return fetch(`https://graph.facebook.com/v2.12/me/${endpoint}?access_token=${this.accessToken}`, {
method,
headers: {
'Content-Type': 'application/json'
Expand Down Expand Up @@ -334,7 +334,7 @@ class BootBot extends EventEmitter {
* @returns {Promise}
*/
getUserProfile(userId) {
const url = `https://graph.facebook.com/v2.6/${userId}?fields=first_name,last_name,profile_pic,locale,timezone,gender&access_token=${this.accessToken}`;
const url = `https://graph.facebook.com/v2.12/${userId}?fields=first_name,last_name,profile_pic,locale,timezone,gender&access_token=${this.accessToken}`;
return fetch(url)
.then(res => res.json())
.catch(err => console.log(`Error getting user profile: ${err}`));
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bootbot",
"version": "1.0.15",
"version": "1.0.16",
"description": "Facebook Messenger Bot Framework",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 6c9ed93

Please sign in to comment.