niels Posted June 24, 2011 Share Posted June 24, 2011 Hey everybody, I'm hving a problem with a script I'm using and I hope somebody could help on the forum. I started implementing the facebook like button. I noticed they encouraged you to use this piece of code : <div id="fb-root"></div> <script> window.fbAsyncInit = function() { FB.init({appId: 'your app id', status: true, cookie: true, xfbml: true}); }; (function() { var e = document.createElement('script'); e.async = true; e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js'; document.getElementById('fb-root').appendChild(e); }()); </script> Now that doesn't work for me at the moment and I thought it had something todo with the special htmltag you need to use so I thought to implement my on script loading this way first. Easy enough I thought but after 2 days searching around, and I'm not that familiar with javascript or jquery. I wrote this piece of script to load my own jquery(this part is work correctly because I tried the static linking first). <script type="text/javascript"> //<![CDATA[ (function() { var e = document.createElement('script'); e.type = "text/javascript"; e.async = true; e.src = ('/js/general.js'); var x = document.getElementsByTagName('script')[0]; x.parentNode.insertBefore(e, x); }); //]]> </script> I followed a tutorial somewhere online, just replace the write url but it didn't worked sadly enough. I hope there are some javascript master on the forum who could help with some tips. Maybe give be some links to good javascript tuts Thanks in advance Quote Link to comment Share on other sites More sharing options...
elegin Posted June 24, 2011 Share Posted June 24, 2011 (edited) Looked over the facebook dev section for this ( https://developers.facebook.com/docs/reference/plugins/like/ ). Have you become a verified developer? How do I verify my developer account : http://www.facebook.com/help/?faq=17580 Edited June 24, 2011 by elegin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.