AbanteCart Community

Shopping Cart Operations => Support => General Support => Topic started by: emanuelben616 on July 08, 2015, 01:27:37 PM

Title: where do i put JavaScript SDK for Facebook like page
Post by: emanuelben616 on July 08, 2015, 01:27:37 PM
Hi All,

    I have been trying for ever to create a Facebook like button on my website but for some reason it isn't working. Ive tried everything. Facebook is asking me to put in the JavaScript SDK that they provide once on the page you want it to be on and they give m the code. but idk where to put it, i put it on the social media block but it doesn't show up. Has anyone dealt with this issue before? Please let me know. Thank you
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: abolabo on July 08, 2015, 01:57:58 PM
1. design->blocks->create new html-block, paste FB code in a "source" mode.
2 . add this block in layout on design->layouts
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: emanuelben616 on July 08, 2015, 02:00:41 PM
ok thank you very much ill give it a try ill give it a try
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Basara on July 09, 2015, 03:41:17 AM
http://www.abantecart.com/ecommerce-documentation/admin-user-manual/design/blocks-user-manual/html-block
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Unboxit on February 06, 2016, 01:12:04 PM
Hi, I have pasted the facebook javascript sdk and plugin codes into a new html block.
But it still doesn't work. My url is unboxit.com.au

I paste the codes from facebook using the Add new HTML block and edit in "source"

I paste more sets of codes (javascript sdk & page plugin codes) together into the one same html block. I have tried everything it still doesn't work. Why doesn't it work??

The codes i paste in are:

<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 = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5";
  fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>

<div class="fb-page" data-href="" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><div class="fb-xfbml-parse-ignore"><blockquote cite=""><a href="">Online Retail Therapy</a></blockquote></div></div>
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Presskey on February 06, 2016, 05:59:12 PM
Did you paste into the source window?  If you paste straight into the html editor the code will be incorrect.
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Unboxit on February 06, 2016, 10:56:24 PM
Yes i did paste it into "source" window.

However because facebook supplies 2 sets of codes, 1 for the Javascript SDK, and the other for the page plugin itself.

Do i paste both set of codes into 1 html block?

I did that and it still is not working..
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Presskey on February 07, 2016, 06:54:33 AM
Yes you paste both sets of code in the source.
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Unboxit on February 07, 2016, 11:49:01 PM
Have anyone done it before and got it working?

Is there anything I have to edit in the 2 source code and do I have to lay it out in a certain way?

I paste both codes in the html block under source input its still not working...  :-\
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Presskey on February 08, 2016, 01:30:55 AM
I stated what to do with the code I did not verify that what you had entered was correct.  You did not request someone to test your coding.

Where did you get the code from?

Did you follow the instructions in the Developer Guide?

What are you trying to accomplish?
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Unboxit on February 08, 2016, 02:19:41 AM
I got the codes from Facebook's Page plugin code generator, where you enter in your facebook Fan page address and select various options and Facebook generates the code for you.

I pasted the 2 sets of codes in my earlier posts in this chain.

What I want to achieve is to display the Facebook Page plugin on my website blocks.
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: yonghan on February 08, 2016, 04:24:23 AM
Hi, i can see the facebook like page in your site.
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Unboxit on February 08, 2016, 04:48:14 AM
Hi Handoyo,

That is so strange. What is wrong with my browser as I am still unable to display any facebook block plugins.

I was told to run my browser without addons, but I don't know what addons and the reason.

I loaded my website on 2 different computers and both aren't showing the facebook blocks
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: yonghan on February 08, 2016, 06:30:16 AM
Do you have any addons in your browser? If yes, what are the addons that you installed? I just reopen your site via My tablet and I still able to see the facebook block.
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Unboxit on February 08, 2016, 09:47:04 AM
Hi Handoyo,

Yes I finally got it to work in Google Chrome now.
However some reason Firefox still doesn't like it.
I really don't have much addons in Firefox.
I got Firebug, Adobe Acrobat, Google Update, Shockwave Flash, Microsoft Office 2016.

I have now disabled all of them and shall retry.
Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Unboxit on February 08, 2016, 11:27:20 AM
Finally working in Firefox!

Culprit wasn't the apps, because even after disabling all the addons it still wasn't loading.

Once I went into Options -> Privacy -> Untick "Use Tracking Protection in Private Windows"...Facebook Page plugin loads !

That parameter must have been defaulted as ticked by Firefox.
If so then probably alot of users would not have Facebook plugins loaded correctly on the sites they visit if they use Firefox as their browser.



Title: Re: where do i put JavaScript SDK for Facebook like page
Post by: Basara on February 09, 2016, 08:34:16 AM
Hi. Looks like Tracking Protection is enabled by default only when you're in a Private Browsing window.