From 2e1a2342ef3c371c87ff14f3370172383f59b193 Mon Sep 17 00:00:00 2001 From: Pavel Date: Mon, 15 Mar 2010 16:41:44 +0200 Subject: [PATCH] Publishing changes --- online/app/controllers/user_controller.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/online/app/controllers/user_controller.rb b/online/app/controllers/user_controller.rb index 973eb58..dd51d81 100644 --- a/online/app/controllers/user_controller.rb +++ b/online/app/controllers/user_controller.rb @@ -92,11 +92,13 @@ class UserController < ApplicationController user_has_published_once = false user_has_published_once = question_processor if user_has_published_once + session_new = Facebooker::Session.create + @userFB = Facebooker::User.new(session[:facebook_session].user.uid, session_new) + publishing (@userFB,@userFB,"selected thier top 5 friends: #{@userFB2.first_name}, X, Y, Z, W to win Nokia E72. How well do you know your friends? Answer and win now!","Take the Nokia E72 challenge","http://foo.com","2Take the Nokia E72 friendship challenge now to win up to 6 Nokia E72 devices","http://foo2.com","3Take the Nokia E72 friendship challenge now to win up to 6 Nokia E72 devices",'image',"http://www.finalsense.com/news/image/mobile/nokia-6124classic.jpg","http://foo3.com") render :action => "greetings" end end - def question_processor user_has_published_once = false for i in 0...6 @@ -112,9 +114,9 @@ class UserController < ApplicationController #publishing first message #p @today_quiz.feedpic.url(:normal) - publishing (@userFB,@userFB,"selected his top 5 friends: #{@userFB2.first_name}, X, Y, Z, W to win Nokia E72. How well do you know your friends? Answer and win now!","Take the Nokia E72 challenge","http://foo.com","2Take the Nokia E72 friendship challenge now to win up to 6 Nokia E72 devices","http://foo2.com","3Take the Nokia E72 friendship challenge now to win up to 6 Nokia E72 devices",'image',"http://www.finalsense.com/news/image/mobile/nokia-6124classic.jpg","http://foo3.com") + #publishing (@userFB,@userFB,"selected their top 5 friends: #{@userFB2.first_name}, X, Y, Z, W to win Nokia E72. How well do you know your friends? Answer and win now!","Take the Nokia E72 challenge","http://foo.com","2Take the Nokia E72 friendship challenge now to win up to 6 Nokia E72 devices","http://foo2.com","3Take the Nokia E72 friendship challenge now to win up to 6 Nokia E72 devices",'image',"http://www.finalsense.com/news/image/mobile/nokia-6124classic.jpg","http://foo3.com") - #publishing (@userFB,@userFB2,"#{@userFB2.first_name}, you are one of my best friend here. I also picked X, Y, Z, W. Let's stay in youch","Take the Nokia E72 challenge","http://foo.com","2Take the Nokia E72 friendship challenge now to win up to 6 Nokia E72 devices","http://foo2.com","3Take the Nokia E72 friendship challenge now to win up to 6 Nokia E72 devices",'image',"http://www.finalsense.com/news/image/mobile/nokia-6124classic.jpg","http://foo3.com") + publishing (@userFB,@userFB2,"#{@userFB2.first_name}, you are one of my best friend here. I also picked X, Y, Z, W. Let's stay in youch","Take the Nokia E72 challenge","http://foo.com","2Take the Nokia E72 friendship challenge now to win up to 6 Nokia E72 devices","http://foo2.com","3Take the Nokia E72 friendship challenge now to win up to 6 Nokia E72 devices",'image',"http://www.finalsense.com/news/image/mobile/nokia-6124classic.jpg","http://foo3.com") debug_message("Message was published into stream") user_has_published_once = true -- 2.11.4.GIT