Skip to main content


Showing posts from September, 2014

Omniauth Linked in Ruby On Rails

def get_linkedin_user_data
     omniauth = request.env["omniauth.auth"]
     linked_app_key = "xxxxxxx"
     linkedin_secret_key = "yyyyyyy"
     client =,linkedin_secret_key)
     connections=client.connections(:fields => ["id", "first-name", "last-name","picture-url"])
  #linked user data
    omniauth = request.env["omniauth.auth"]
     data             =
     user_name        = data["name"]
     user_email       = data["email"]
     user_nickname    = data["nickname"]
     user_firstname   = data["first_name…

Kola Gem Implementaion In Ruby On Rails

Facebook omniauth with kola gem Implementation on Rails 3
1)Gem file add these lines
gem 'koala'

2)Facebook User Details getting

 token = request.env['omniauth.auth']["credentials"]["token"]
   # omniauth = request.env["omniauth.auth"]
   # token = omniauth['credentials']['token']
 @graph =
 #Get The User Details of user
 fb_profile = @graph.get_object("me")
 #Get The Fb user freinds list
 friends = @graph.get_connections("me", "friends")
 firend_ids ={ |friend| friend["id"]}
  image_url = @graph.get_picture(@fb_id)
  image = open(image_url)
      full_name = fb_profile["name"]
      sub_name = fb_profile["first_name"]
      if fb.include?("location")
        location = fb_profile["location"]["name"]
      elsif fb.include?("hometown")
        location = fb_profile["hometown"]["name&quo…

Ezpservices Integration In Ruby on Rails(Cafe Press)

Ezprints  Integration In rails

1)Posting Order to Ezprints and get the shipping values
require 'net/https'
require 'rexml/document'
def shipping_options_ezp_services
      @order = Order.where(:id => 5).first
      @total_orders = Order.all
      xml = "<?xml version='1.0' encoding='UTF-8'?>
      <orders partnerid='45678' version='1'>
     @total_orders.each do |t|
        xml << &q…