Jump to:

23358 Posts in 17874 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Facebook Like box

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 346 Views
  • bones
    Avatar
    Community Member
    104 Posts

    Facebook Like box Link to this post

    This is bizarre. I've put FB Like boxes on loads website (Silverstripe and others), but I just can't get this one to work!

    I'm using the standard HTML5 Like Box (obtained from here: https://developers.facebook.com/docs/reference/plugins/like/ ), and inserted the Javascript right after the opening <body> tag and the plugin code elsewhere in the body.

    However, all I end up with on pages is a pink box with the following:

    This page contains the following errors:
    error on line 20 at column 62: EntityRef: expecting ';'
    Below is a rendering of the page up to the first error.

    Line 20 seems to be

    js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=285581704824865";

    This is the first website where I've used SS 2.4.10. Could this be part of the problem?

    Thanks

  • Willr
    Avatar
    Forum Moderator
    5482 Posts

    Re: Facebook Like box Link to this post

    Is your Page using an HTML5 doctype?

  • bones
    Avatar
    Community Member
    104 Posts

    Re: Facebook Like box Link to this post

    Hi Willr

    Thanks for your reply.

    It turns out to be an error in the code generated by Facebook.

    The 6th line generated was:

    js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId=285581704824865";


    However, the ampersand needed to be changed to &amp;. Once that was done, it worked fine

    346 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.