Lets begin with a short story. One day i want to make a fanspage about my blog so i decide to create it with the same name as my blog. I just create it a bit time and its complete. Now i dont talk about creating a fanspage, it will be in other post. After create a fanspage i start to make a page plugin. I have follow the instruction but get an error while saving the javascript code. This is from the developer fb.
here the code in the red rectangle
<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'https://connect.facebook.net/id_ID/sdk.js#xfbml=1&version=v2.12&appId=1789352757996862&autoLogAppEvents=1'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
While it pasted in the theme and start to saving, i get the error:
on this problem i just add some amp; to the code
from: js.src = 'https://connect.facebook.net/id_ID/sdk.js#xfbml=1&version=v2.12&appId=1789352757996862&autoLogAppEvents=1';
to: js.src = 'https://connect.facebook.net/id_ID/sdk.js#xfbml=1&version=v2.12&appId=1789352757996862&autoLogAppEvents=1';
So it will be
<div id="fb-root"></div> <script>(function(d, s, id) { var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) return; js = d.createElement(s); js.id = id; js.src = 'https://connect.facebook.net/id_ID/sdk.js#xfbml=1&version=v2.12&appId=1789352757996862&autoLogAppEvents=1'; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk'));</script>
And now the problem fixed
This is just a few trick for How to fix : the reference to entity "version" must end with the ';' delimiter.
Thanks for visiting, see you on next post ^^
0 comments:
Post a Comment