Facebook SDK error: init not called with valid version
up vote
0
down vote
favorite
I'm implenting a Facebook share dialog to my React site, and I'm receiving the following error when calling FB.ui():
init not called with valid version
I also manually added <div id="fb-root"></div>
to my index file before the FB.init() script is ran. I am using a valid version, and all my FB init and share code is taken directly from the Facebook docs.
Has anyone else experienced this bug?
Thanks!
javascript reactjs facebook facebook-javascript-sdk
|
show 1 more comment
up vote
0
down vote
favorite
I'm implenting a Facebook share dialog to my React site, and I'm receiving the following error when calling FB.ui():
init not called with valid version
I also manually added <div id="fb-root"></div>
to my index file before the FB.init() script is ran. I am using a valid version, and all my FB init and share code is taken directly from the Facebook docs.
Has anyone else experienced this bug?
Thanks!
javascript reactjs facebook facebook-javascript-sdk
1
yup, I just edited my question to include that I already added fb-root. @Tholle
– awebdev
Nov 9 at 20:14
Have you tried adding&version=v2.0
to thejs.src
in the script?
– Tholle
Nov 9 at 20:15
1
Yup, I add ?version=v2.0 to js.src @Tholle
– awebdev
Nov 9 at 20:26
1
Ya it's really frustrating :/ Someone asked the same question on here a couple years ago, and there was no official solution. I tried all.js instead of sdk.js. No luck with that either unfortunately. @Tholle
– awebdev
Nov 9 at 20:30
1
Just posted a solution that works for me @Tholle
– awebdev
Nov 9 at 20:49
|
show 1 more comment
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm implenting a Facebook share dialog to my React site, and I'm receiving the following error when calling FB.ui():
init not called with valid version
I also manually added <div id="fb-root"></div>
to my index file before the FB.init() script is ran. I am using a valid version, and all my FB init and share code is taken directly from the Facebook docs.
Has anyone else experienced this bug?
Thanks!
javascript reactjs facebook facebook-javascript-sdk
I'm implenting a Facebook share dialog to my React site, and I'm receiving the following error when calling FB.ui():
init not called with valid version
I also manually added <div id="fb-root"></div>
to my index file before the FB.init() script is ran. I am using a valid version, and all my FB init and share code is taken directly from the Facebook docs.
Has anyone else experienced this bug?
Thanks!
javascript reactjs facebook facebook-javascript-sdk
javascript reactjs facebook facebook-javascript-sdk
edited Nov 9 at 20:13
asked Nov 9 at 20:08
awebdev
509
509
1
yup, I just edited my question to include that I already added fb-root. @Tholle
– awebdev
Nov 9 at 20:14
Have you tried adding&version=v2.0
to thejs.src
in the script?
– Tholle
Nov 9 at 20:15
1
Yup, I add ?version=v2.0 to js.src @Tholle
– awebdev
Nov 9 at 20:26
1
Ya it's really frustrating :/ Someone asked the same question on here a couple years ago, and there was no official solution. I tried all.js instead of sdk.js. No luck with that either unfortunately. @Tholle
– awebdev
Nov 9 at 20:30
1
Just posted a solution that works for me @Tholle
– awebdev
Nov 9 at 20:49
|
show 1 more comment
1
yup, I just edited my question to include that I already added fb-root. @Tholle
– awebdev
Nov 9 at 20:14
Have you tried adding&version=v2.0
to thejs.src
in the script?
– Tholle
Nov 9 at 20:15
1
Yup, I add ?version=v2.0 to js.src @Tholle
– awebdev
Nov 9 at 20:26
1
Ya it's really frustrating :/ Someone asked the same question on here a couple years ago, and there was no official solution. I tried all.js instead of sdk.js. No luck with that either unfortunately. @Tholle
– awebdev
Nov 9 at 20:30
1
Just posted a solution that works for me @Tholle
– awebdev
Nov 9 at 20:49
1
1
yup, I just edited my question to include that I already added fb-root. @Tholle
– awebdev
Nov 9 at 20:14
yup, I just edited my question to include that I already added fb-root. @Tholle
– awebdev
Nov 9 at 20:14
Have you tried adding
&version=v2.0
to the js.src
in the script?– Tholle
Nov 9 at 20:15
Have you tried adding
&version=v2.0
to the js.src
in the script?– Tholle
Nov 9 at 20:15
1
1
Yup, I add ?version=v2.0 to js.src @Tholle
– awebdev
Nov 9 at 20:26
Yup, I add ?version=v2.0 to js.src @Tholle
– awebdev
Nov 9 at 20:26
1
1
Ya it's really frustrating :/ Someone asked the same question on here a couple years ago, and there was no official solution. I tried all.js instead of sdk.js. No luck with that either unfortunately. @Tholle
– awebdev
Nov 9 at 20:30
Ya it's really frustrating :/ Someone asked the same question on here a couple years ago, and there was no official solution. I tried all.js instead of sdk.js. No luck with that either unfortunately. @Tholle
– awebdev
Nov 9 at 20:30
1
1
Just posted a solution that works for me @Tholle
– awebdev
Nov 9 at 20:49
Just posted a solution that works for me @Tholle
– awebdev
Nov 9 at 20:49
|
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
The solution that worked for me was to remove fbAsyncInit() and instead, add the FB.init properties to js.src like so:
js.src = "https://connect.facebook.net/en_US/sdk.js#version=v2.2&appId=myAppId&xfbml=true&autoLogAppEvents=true";
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
The solution that worked for me was to remove fbAsyncInit() and instead, add the FB.init properties to js.src like so:
js.src = "https://connect.facebook.net/en_US/sdk.js#version=v2.2&appId=myAppId&xfbml=true&autoLogAppEvents=true";
add a comment |
up vote
1
down vote
accepted
The solution that worked for me was to remove fbAsyncInit() and instead, add the FB.init properties to js.src like so:
js.src = "https://connect.facebook.net/en_US/sdk.js#version=v2.2&appId=myAppId&xfbml=true&autoLogAppEvents=true";
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
The solution that worked for me was to remove fbAsyncInit() and instead, add the FB.init properties to js.src like so:
js.src = "https://connect.facebook.net/en_US/sdk.js#version=v2.2&appId=myAppId&xfbml=true&autoLogAppEvents=true";
The solution that worked for me was to remove fbAsyncInit() and instead, add the FB.init properties to js.src like so:
js.src = "https://connect.facebook.net/en_US/sdk.js#version=v2.2&appId=myAppId&xfbml=true&autoLogAppEvents=true";
answered Nov 9 at 20:49
awebdev
509
509
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53232654%2ffacebook-sdk-error-init-not-called-with-valid-version%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
yup, I just edited my question to include that I already added fb-root. @Tholle
– awebdev
Nov 9 at 20:14
Have you tried adding
&version=v2.0
to thejs.src
in the script?– Tholle
Nov 9 at 20:15
1
Yup, I add ?version=v2.0 to js.src @Tholle
– awebdev
Nov 9 at 20:26
1
Ya it's really frustrating :/ Someone asked the same question on here a couple years ago, and there was no official solution. I tried all.js instead of sdk.js. No luck with that either unfortunately. @Tholle
– awebdev
Nov 9 at 20:30
1
Just posted a solution that works for me @Tholle
– awebdev
Nov 9 at 20:49