The above instructions will allow you to implement the “Facebook → Shop-Script” integration. In addition to that, you can also very easily take advantage of the integration in the opposite direction: "Shop-Script → Facebook". This kind of integration is possible using JavaScript functions provided by Facebook (rather than Shop-Script!) and is limited to the ability of adding Like buttons to your main storefront which can be clicked by visitors who have a Facebook account to publish information about your products on their personal walls.
The main advantage of the “Shop-Script → Facebook” integration is its simplicity: all you need to do is to obtain the code of the Like button on the Facebook website and to add it to your storefront using the built-in design editor. You do not even have to register your online store in the social network in this case!
To add the Like button to product pages in your online store, open page https://developers.facebook.com/docs/plugins/like-button.
Enter the URL of your online store in field URL to like, select other options, and click on Get Code. This will show a pop-up window with plugin-embedding code.
- Copy the first code snippet ("JavaScript SDK") and paste it to file index.html of your design theme, right after the opening <body> tag.
- Copy and paste the second code snippet into the desired design theme template, where you want the Like button to appear.
If you need the Like button only on product-viewing pages, then paste the second code snippet to template file product.html.
0 comments
No comments yet.