Code Monkey home page Code Monkey logo

Comments (4)

westhechiang avatar westhechiang commented on July 30, 2024

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.

from shareit.

Nullpo avatar Nullpo commented on July 30, 2024

@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)

from shareit.

DDavis1025 avatar DDavis1025 commented on July 30, 2024

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.

from shareit.

Nullpo avatar Nullpo commented on July 30, 2024

@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 ;)

from shareit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.