Skip to content
Open

Main #133

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions src/LoginSocialFacebook/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { objectType, IResolveParams } from '../';

interface Props {
appId: string;
configId: string;
scope?: string;
state?: boolean;
xfbml?: boolean;
Expand Down Expand Up @@ -36,6 +37,7 @@ const _window = window as any;

const LoginSocialFacebook = ({
appId,
configId = '',
scope = 'email,public_profile',
state = true,
xfbml = true,
Expand Down Expand Up @@ -144,16 +146,16 @@ const LoginSocialFacebook = ({
setIsSdkLoaded(true);
} else {
insertSDKScript(document, () => {
initFbSDK(
{
let options = {
appId,
xfbml,
version,
state,
cookie,
redirect_uri,
response_type,
},
};
initFbSDK(options,
document,
);
});
Expand Down Expand Up @@ -181,14 +183,19 @@ const LoginSocialFacebook = ({
} else {
setIsProcessing(true);
onLoginStart && onLoginStart();
_window.FB.login(handleResponse, {
let options = {
scope,
return_scopes,
auth_type,
});
};
if(configId){
options["config_id"] = configId;
}
_window.FB.login(handleResponse,options);
}
}, [
load,
configId,
scope,
onReject,
auth_type,
Expand Down