Ruby wrapper for the WishSimple API

WishSimple provides gift recommendations as a service. It's currently in private beta and you can request an API key here.


gem install wishsimple


If you're using Rails, you may want to add the following to config/initializers/wishsimple.rb:

WishSimple.configure do |config|
  config.api_key = '<your API key>'

You can also set the key directly:

WishSimple.api_key = '<your API key>'


WishSimple uses a Facebook user's interactions with products to generate gift recommendations. Currently, only purchases are supported, though more types of interactions will be supported in the near future (e.g. ratings, adding to a wish list, etc.).

To begin, you'll need the following data:

  • facebook_uid - The Facebook user's numerical UID
  • access_token - The Facebook user's OAuth access token (see "Permissions" below)
  • product_uid - Whatever you use to identify the product; usually the database ID

Recording a purchase is as easy as:

user = WishSimple::User.create(facebook_uid, access_token)
product = WishSimple::Product.create(product_uid)

You can interact with objects as you would expect:

user = WishSimple::User.new(facebook_uid)
user.access_token = access_token

purchase = WishSimple::Purchase.new
purchase.user = user
purchase.product = product

You can delete data like so:

# Purchases
purchase = WishSimple::Purchase.new(user: user, product: product)

# Users (this will also delete the user's purchases)
user = WishSimple::User.new(facebook_uid)

# Products (this will also delete the product's purchases)
product = WishSimple::Product.new(product_uid)


You'll want to request the following Facebook permissions when generating the access token:

user_birthday, user_interests, user_likes

Gift Recommendations

Here's a funny riddle:

Q: What kind of gift recommendation service doesn't actually have the ability to request the gift recommendations?
A: One that's in private beta.

Okay, that was terrible, but jokes aside, we're working hard to make the gift recommendations awesome. You can expect them soon.


Copyright (c) 2012 Shaun Chapman and WishSimple, Inc. See LICENSE for details.