Book Image

Meteor Cookbook

By : Isaac Strack
Book Image

Meteor Cookbook

By: Isaac Strack

Overview of this book

Table of Contents (19 chapters)
Meteor Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Adding social sharing


With the ever-increasing demand to integrate social media into your apps, you'll want to gain a basic understanding of how to send/post/share directly from within your app. This recipe will show you how to add Twitter posting (tweets) to your application.

Getting ready

We will be using the Quotes application, from the Creating a complete app with Iron Router recipe found earlier in this in this chapter. Please complete that recipe before proceeding.

We will also be using the npm twit module to complete this recipe. For a step-by-step recipe with a full explanation of each step, please see the first part of the Handling asynchronous events recipe in Chapter 11, Leveraging Advanced Features.

Quickly, here are the steps you'll need to install and configure the twit module:

  1. Execute the following terminal commands:

    $ meteor add meteorhacks:npm
    $ meteor
    
  2. Open packages.json and add the following code:

    {
      "twit" : "1.1.20"
    }
  3. Run the following terminal command:

    $ meteor
    
  4. Create [project...