
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
passport-photo-facebook
Advanced tools
Passport-Photo strategies for retrieving facebook profile pictures.
npm install passport-photo-facebook
var photo = require("passport-photo");
var fb = require("passport-photo-facebook");
photo.use(fb.id());
photo.use(fb.token());
photo.use(fb.search({access_token:"Any Valid Access Token"}));
photo({facebookid:445461, access_token:"User's Access Token",email:"user@example.com"}, function(err, avatarURL){
if(!err) require('request')(avatarURL).pipe(require('fs').createWriteStream("./avatar.jpg"));
});
Take the following options to retrieve the avatar based on facebook user id.
@param [opts] {object} optional options for the request
@param [opts.fb] {string} the property of the user object containing the facebook id default: "facebookid"
@param [opts.type] {string} the size of the image to return 'square', 'small', 'normal' or 'large' default: 'square'
Take the following options to retrieve the avatar based on facebook user access token.
@param [opts] {object} optional options for the request
@param [opts.access_token] {string} the property of the user object containing the facebook access token default: "access_token"
@param [opts.type] {string} the size of the image to return 'square', 'small', 'normal' or 'large' default: 'square'
Using any valid user access token, you can search for a user based on their e-mail address, and then get their profile picture from that.
Takes the following options.
@param opts {object} options for the request
@param opts.access_token {string} an access token is required to perform search, any access token will do though
@param [opts.email] {string} the property of the user object containing the email token default: "email"
@param [opts.type] {string} the size of the image to return 'square', 'small', 'normal' or 'large' default: 'square'
FAQs
Passport-Photo strategies for retrieving facebook profile pictures.
The npm package passport-photo-facebook receives a total of 3 weekly downloads. As such, passport-photo-facebook popularity was classified as not popular.
We found that passport-photo-facebook demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.