Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Facebook Comments" do not work for single posts. #86

Closed
FlorianWolters opened this issue May 13, 2012 · 4 comments
Closed

"Facebook Comments" do not work for single posts. #86

FlorianWolters opened this issue May 13, 2012 · 4 comments
Assignees
Labels
Milestone

Comments

@FlorianWolters
Copy link

Hi,

I just discovered that the way "Facebook Comments" are included only works for the entire site and not for every single post.

The file _includes/JB/comments-providers/facebook has to be changed to the following to fix this issue:

<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/all.js#xfbml=1&appId={{ site.JB.comments.facebook.appid }}";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
</script>
<div class="fb-comments" data-href="{{ site.production_url }}{{ page.url }}" data-num-posts="{{ site.JB.comments.facebook.num_posts }}" data-width="{{ site.JB.comments.facebook.width }}" data-colorscheme="{{ site.JB.comments.facebook.colorscheme }}"></div>

I only changed data-href="{{ site.production_url }}" to data-href="{{ site.production_url }}{{ page.url }}".

@alishutc
Copy link
Contributor

I just discovered this too. Happy to create a PR to fix this.

@groundh0g
Copy link
Collaborator

Thanks for the info. Can't believe it hasn't been patched yet. Your fix worked great for me.

@groundh0g groundh0g self-assigned this Feb 28, 2015
@groundh0g groundh0g added the bug label Feb 28, 2015
@groundh0g
Copy link
Collaborator

@FlorianWolters's fix 0f60744 needs to be made in the official repo. I won't add all the formatting changes, just the edit to the existing line ...

// in file: jekyll-bootstrap/_includes/JB/comments-providers/facebook
<div class="fb-comments" data-href="{{ site.production_url }}" data-num-posts="...

... to read as follows.

<div class="fb-comments" data-href="{{ site.production_url }}{{ page.url }}" data-num-posts="...

plusjade added a commit that referenced this issue Feb 28, 2015
@groundh0g
Copy link
Collaborator

Looks like this is fixed in master. Closing. If you're still having issues, feel free to reopen.

@groundh0g groundh0g added this to the v 0.4.0 milestone Mar 15, 2015
aterai pushed a commit to aterai/jekyll-bootstrap that referenced this issue Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants