Socket
Socket
Sign inDemoInstall

facebook-send-api

Package Overview
Dependencies
50
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.0 to 2.5.0

9

lib/index.d.ts

@@ -62,2 +62,10 @@ import * as Promise from 'bluebird';

}
export interface FacebookUser {
first_name: string;
last_name: string;
profile_pic: string;
locale: string;
timezone: number;
gender: string;
}
export declare class FBMessage {

@@ -132,2 +140,3 @@ protected platform: FBPlatform;

createQuickReply(title: string, payload: string): MessengerQuickReply;
getUserProfile(id: string): Promise<FacebookUser>;
}

4

lib/index.js

@@ -336,2 +336,6 @@ "use strict";

};
FBPlatform.prototype.getUserProfile = function (id) {
return rp("https://graph.facebook.com/v2.6/" + id + "?fields=first_name,last_name,profile_pic,locale,timezone,gender&access_token=" + this.token)
.then(function (response) { return JSON.parse(response); });
};
return FBPlatform;

@@ -338,0 +342,0 @@ }());

2

package.json
{
"name": "facebook-send-api",
"version": "2.4.0",
"version": "2.5.0",
"description": "Promise based module to speak to the facebook send api for the messenger platform",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -75,2 +75,11 @@ import * as Promise from 'bluebird';

export interface FacebookUser {
first_name: string;
last_name: string;
profile_pic: string;
locale: string;
timezone: number;
gender: string;
}
interface MessengerPostback {

@@ -436,2 +445,7 @@ payload: string,

}
public getUserProfile(id: string): Promise<FacebookUser> {
return rp(`https://graph.facebook.com/v2.6/${id}?fields=first_name,last_name,profile_pic,locale,timezone,gender&access_token=${this.token}`)
.then((response: string) => JSON.parse(response) as FacebookUser);
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc