Closed sbolel closed 5 years ago
@sbolel I've seen that in the documentation is a version parameter with the purpose of defining the API version, have you already tested it ?
@GustavoDinizMonteiro that's correct, it's one of the props:
<FacebookLogin
version="3.1" // now we're using the latest version
appId="1088597931155576"
autoLoad={true}
fields="name,email,picture"
callback={this.responseFacebook}
/>
...and that prob overrides the defaultProps.version
:
static defaultProps = {
redirectUri: typeof window !== 'undefined' ? window.location.href : '/',
scope: 'public_profile,email',
returnScopes: false,
xfbml: false,
cookie: false,
authType: '',
fields: 'name',
version: '2.3', // this is outdated
language: 'en_US',
disableMobileRedirect: false,
isMobile: getIsMobile(),
onFailure: null,
state: 'facebookdirect',
responseType: 'code',
};
...and that resolves the issue!
I feel like it would still be good to increase the default version to one that is officially supported by facebook. It's easy to overlook the version
prop 😅
@sbolel oh yes, I agree with you, I was thinking that you were not able to change the version :sweat_smile: rsrsrs . I agree with you, so i'll make a pr for solve this :smile:.
Awesome! :) This is an excellent library, and i think having the version updated will make it that much better. Let me know if I can help with anything!
This issue can be closed now
Awesome work @GustavoDinizMonteiro! I closed the issue as your PR fixes it. Much appreciated.
Summary
The default FB SDK version is outdated.
Current Behavior
The
defaultProps.version
is currently set tov2.3
. The Facebook JavaScript reference no longer lists v2.3 of the SDK -- v2.7 is the oldest version listed.Expected Behavior
The default FB SDK version should be changed to the latest, v3.1, if breaking changes don't have an impact. At a minimum, it should be updated to v2.7 so that users of this package can reference accurate docs.