jaredhanson/passport-facebook — pull request #89 by jacobawenger (2014-07-03 06:15:08+00:00)
Title: Fixed issue where Facebook would not return all basic public profile information if no profile fields are specified

With the new version 2.0 of [Facebook Login](https://developers.facebook.com/docs/apps/upgrading), requesting the basic profile scope from Facebook no longer seems to return the profile picture, age range, timezone, etc., even if those items are public. Adding things like `photos`, `age_range`, `timezone`, etc. to the `profileFields` parameter does return this data, but it's expected behavior that not specifying anything in `profileFields` should return all public profile data.

From my glancing at this, it appears that Facebook is in the wrong here by no longer returning all public profile data if no `fields` query string parameter is passed. There is actually a [bug open on this from January 28](https://developers.facebook.com/bugs/581729778568089/) and I pinged the thread to see if there was any resolution. In the end, Facebook returns what Facebook wants and that is causing a breaking change in `facebook-passport`. A solution would be to change:

```
this._profileFields = options.profileFields || null;
```

to something like:

```
this._profileFields = options.profileFields || ['id', 'displayName', 'name', 'gender', 'birthday', 'profileUrl', 'emails', 'photos', 'age_range', 'locale', 'location', 'timezone'];
```

but that feels pretty hacky. Maybe it is good enough for the time being. Any thoughts on how to handle this?