passport-facebook-token
passport-facebook-token copied to clipboard
add options to not return the raw data and unpaginate profile fields
Hi, for some reason GitHub put together both commits in one PR:
- In some circumstances returning the raw data isn't necessary and might even be a waste of resources (e.g. when the profile will be saved to a database). This PR ads an option to disable this behavior (default behavior isn't changed)
- For some fields Facebook doesn't return all values but paginates them (see https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#paging ). With this PR its possible to specificy these fields with the option "unpaginateFields" and they will be completely loaded. Obviously this will result in a performance hit so it should only be used when absolutely necessary (default behavior isn't changed)
Cheers
- Chris
Hey @chkuendig, would you mind adding some tests for these new options?
@chkuendig seems that tests on Travis CI is successful, but anyway, it's new features. Please, cover them with tests. Thank you.
Hi @drudge, Hi @ghaiklor i added some simple tests to cover these two options. Regards
- Christian
anything missing before you can merge this?
merged recent changes in upstream.
anything holding this back from being merged?
@drudge any suggestions? @chkuendig if you move unpaginate to prototype and make it clean then we can merge it.