Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't find variable: FB?

I'm trying to load a page with jquery.load, and after I have loaded it, I'm trying to run this code in that page:

FB.XFBML.parse();

and then I get the error: Can't find variable: FB

What am I doing wrong?

like image 494
Claes Gustavsson Avatar asked Mar 23 '26 19:03

Claes Gustavsson


1 Answers

You have to load the Facebook Javascript SDK first. See this link for multiple ways to do that.

like image 125
Waynn Lue Avatar answered Mar 25 '26 09:03

Waynn Lue



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!