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

The social buttons not are not working right #30

Open
arunkumarahuja opened this issue Jan 24, 2015 · 4 comments
Open

The social buttons not are not working right #30

arunkumarahuja opened this issue Jan 24, 2015 · 4 comments

Comments

@arunkumarahuja
Copy link

I have used only {{> shareit}} on a static page. No configuration.

When I click the facebook share button, it opens a new tab with a hash after the url. (nothing gets shared)
When I click the google share button, two twitter tweet popups appear. (nothing gets shared on google)

Twitter share seems to work right.

@westhechiang
Copy link

facebook shareit is working fine for me. I did try putting {{> shareit}} on a page that isn't on /blog and got the same exact results that you are describing. I think that's the issue.

edit: oops, got here from the meteor-blog github, my bad.

@Nullpo
Copy link

Nullpo commented Feb 26, 2015

@arunkumarahuja @westhechiang I had the same problem, but I found the solution.

I wrote in the template:

{{> shareIt }}

And it doesn't work. So I wrote this:

{{> shareIt shareData }}

...and the problem was solved!

(shareData is a template helper, like the example in the readme.md file)

@DDavis1025
Copy link

I used {{> shareit shareData}} and seem to be getting the same issue as using {{>shareit}}. Twitter works. FB just creates a new tab of the same page with /# next to it. Google+ creates a twitter post.

@Nullpo
Copy link

Nullpo commented Feb 27, 2015

@DDavis1025

Currently, I have this code:

[client/productHeader.js]

Template.productHeader.helpers({
  shareData: function() {
    var resp = {  title: this.name + " en mercadOrganico!", 
                  excerpt:"a Message",
                  description:"a Description",
                  summary:"a Summary",
                  author:"from MyApp"
                };
    return resp;
  }
});

[client/productHeader.html]

<template name="productHeader">
    {{> shareit shareData}}
</template>

[client/main.js]

ShareIt.configure({
  useFB: true,          // boolean (default: true)
  useTwitter: true,     // boolean (default: true)
  useGoogle: true,      // boolean (default: true)
  classes: "large btn", // string (default: 'large btn')
  iconOnly: true,       // boolean (default: false)
  applyColors: true     // boolean (default: true)
});

At the moment, I have a problem with the "this.name" line in productHeader.js, but that is another issue ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants