RSS Recent Posts | Pages

http://jypsie.com/RFacebook/posts

Monday December 17th, 2007

Using the rfacebook gem? Tell us about your Facebook app - rfacebook Sightings Series replied by Gerald @ Mon, 17 Dec 2007 19:33:56 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

Hello,

If you’re using the rfacebook gem I invite you to let us know about your Facebook app on the rfacebook questions & answers mailing list/forum @ http://groups.google.com/group/rfacebook

I will spotlight your Facebook applications in a new monthly rfacebook Sightings series on the rfacebook questions & answers site @ http://rfacebook.wordpress.com

Cheers.

Gerald

PS: Two Facebook success stories out of Vancouver, B.C. (in the Great White North up in Canada) in Ruby on Rails using the rfacebook gem include Hockey Pool and Are You Normal? More @ http://bestwest.wordpress.com/2007/12/06/analytics

Friday December 14th, 2007

How do I end the current fbsession? replied by sanj @ Fri, 14 Dec 2007 16:56:45 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

I got this working. It was a bit of a pain.

1. To clear out the fbsession:

session[:rfacebook_session] = nil
 @rfacebook_session_holder = nil

2. You need to force the next login to be REQUIRED. I had to patch controller_extensions to allow this:

def require_facebook_login(options={})
end
now finish it off depending on whether we are in canvas, iframe, or external app if !performed? try to get the session sess = fbsession handle invalid sessions by forcing the user to log in if !sess.is_valid?

RAILS_DEFAULT_LOGGER.debug “* RFACEBOOK INFO: Session is not valid”

if in_external_app?

RAILS_DEFAULT_LOGGER.debug "* RFACEBOOK INFO: Redirecting to login for external app" 
redirect_to sess.get_login_url(options)
return false

elsif (!fbparams or fbparams.size == 0)

RAILS_DEFAULT_LOGGER.debug "* RFACEBOOK WARNING: Failed to activate due to a bad API key or API secret" 
render :text => facebook_debug_panel
return false

else

RAILS_DEFAULT_LOGGER.debug "* RFACEBOOK INFO: Redirecting to login for canvas app" 
options[:canvas] = true
redirect_to sess.get_login_url(options)
return false

end

end end
return true

3. Now, if you WANT to force the user to login, you must call a specialized before_filter, in my case, if there isn’t an account:

def lc_facebook_login
  account = FacebookAccount.find_by_user_id(current_user.id)
  if !account
    require_facebook_login(:skipcookie=>true)
  else
    require_facebook_login()
  end
end

Trouble getting tunnel working replied by pitosalas @ Fri, 14 Dec 2007 15:57:17 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

I’ve not managed to get it to work. Here’s what I’ve tried:

$ rake facebook:tunnel:start
(in /mydev/railswork/rfbsample/trunk)
======================================================
Tunneling www.mysite.com:6969 to 0.0.0.0:3000

[snip…]

Host www.mysite.com ServerAliveInterval 120

======================================================

Looks good right? But when I go to www.mysite.com:6969 I get “The connection has timed out”

When I go to localhost:3000, the server responds, and redirects to the apps url: http://localhost:3000/myaoo/external, so I would say that localhost:3000 works.

But the tunnel aint tunneling.

By the way, I tried this: $ ssh -gNR 6711:localhost:3000 name@mysite.com and it fails too. Note: my server listens to SSH on a special port, which I include in the SSH commands. Note: ssh name@mysite.com from the shell works fine.

Anyone see what I am doing wrong?

Thursday December 13th, 2007

Making API calls outside of Facebook replied by Jooma @ Thu, 13 Dec 2007 21:57:24 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

The facebook application I’m currently working on has a CMS out side of facebook which runs can run reports on a line item type table.

The table stores a foreign key to my users table and some reports need the inclusion of the users.
Problem is TOS says we can’t store info like a users name for more than 24 hours.

So my question is, can I make api calls outside of facebook so I render a users name instead of just their UID?

Thanks.

Wednesday December 12th, 2007

Development still in progress? replied by dnite @ Wed, 12 Dec 2007 12:12:28 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

I was wondering if anyone knew if development was still active on rFacebook? Facebook just released a new fb_sig_request_method that would work wonders if it was implemented into rfacebook and finally let us go back to developing in truly restful ways..

Also, it would be cool if some sort of AR integration was enabled.. I’m not sure how this would happen.. but in our User model that we put acts_as_facebook_user, wouldn’t be cool to be able to do User.find(1).fb_first_name .. or User.find(1).facebook.first_name .. Just an idea for now. Needs more fleshing out. Any thoughts?

Default Infinite Session Key replied by MikeO @ Wed, 12 Dec 2007 02:32:00 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

Yeah – this is a problem I’m having as well – I’d love to hear how people are solving it

Mike

Friday December 7th, 2007

require_facebook_login and SSL replied by whatelse @ Fri, 07 Dec 2007 23:45:06 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

I have a requirement to do somethings over SSL and am having an issue with include SslRequirement and require_facebook_login

For some reason the request coming into the server gets stuck in this really lame redirect loop.

Any ideas?

Ajax on FB--dynamic forms? replied by seanhussey @ Fri, 07 Dec 2007 04:04:44 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

Hi everyone,

Is it possible to use Ajax on FB to produce dynamic forms? For instance, if someone is filling out a some to-do items on a list and they want to “Add another item”, I’d like them to be able to click a link and have another empty form element appear below it. When the form is submitted, all of the form fields go with it.

In the basic form, that’s it. What I’d like to be able to do is have people create their own form-specific widgets, such that the flow might be something like this:

Add A Question
Text answer or multiple choice? [text input or checkbox]

Then display the new form elements (text field for question content and appropriate answer form items).

Anyway, that might be too much detail, but I just want to know if something like this is possible from within the FB Canvas using the Mock Ajax stuff. The docs seem to say that all of the elements of the form get posted with the Ajax call, which isn’t what I want, and I don’t know if that’d cause trouble.

Thanks!

Sean

Wednesday December 5th, 2007

Liverail tutorial auth issue replied by cyberhill @ Wed, 05 Dec 2007 11:20:44 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

As is always the case, I found the bug a few minutes after posting..

I just had the wrong app name in the environment file at:
ActionController::AbstractRequest.relative_url_root = ”/appName”

Monday December 3rd, 2007

failed to get canvas-friendly URL replied by Sunny Chan @ Mon, 03 Dec 2007 09:26:36 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

i add the line below to envoirment.rb , and finally it works:
ActionController::AbstractRequest.relative_url_root = ”/myappname”

mayeb you can have a try, i think the logic is going to find the appname and replace the string before it. so if it cant find the string, it throw error.

Friday November 30th, 2007

Links send to callback server instead of canvas. replied by Jooma @ Fri, 30 Nov 2007 17:59:20 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

I made a test URL to see what happened without any ruby and it worked fine.

So I know it’s my url_for tag that’s messing up. Seems to be ignoring my only_path => true.

Monday November 26th, 2007

require_facebook_login and SWFs replied by whatelse @ Mon, 26 Nov 2007 22:59:32 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

Is anyone doing anything with SWFs and forcing the user to be logged in to use the SWF? I am having problems getting passed the require_facebook_login filter…. With a logger the fbparams is coming back empty…

Any help would be appreciated!

Thanks.

Saturday November 24th, 2007

Redirecting from Facebook canvas to external application? replied by Gary King @ Sat, 24 Nov 2007 02:29:53 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

I have a Facebook application. At certain points, I want to redirect to the same application but using an external URL. It works somewhat, except the main problem is that the user’s session needs to be recreated. What this means is that, if the user is on http://apps.facebook.com/application/test/page and then I redirect to http://www.example.com/another/test/page , then the user will in fact be redirect to http://www.example.com/ first because a new session for the external website needs to be created. How can I stop this from happening and instead, somehow create the new session for the external website even before redirecting the user to the external component so I don’t have to have the user redirected to the homepage?

require_facebook_login ..Infinite logins replied by chrisnolan.ca @ Sat, 24 Nov 2007 01:20:52 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

what if you hit your testwall.no-ip.org instead of your testwall.com? I’m guessing testwall.com has some sort of redirector on it?

Also, are you trying things from within the canvas on facebook, or are you intentionally going for an ‘external’ app?

Friday November 23rd, 2007

Invitation system problem replied by chrisnolan.ca @ Fri, 23 Nov 2007 17:54:15 -0000

From Recent Posts | Pages, 1 year ago, 0 comments Comment

the new request-form worked out of the box for us. Not in an iframe though. There is some parameter you have to use. Check out the facebook forums as it’s really all done in fbml and not on the server side at all.

« older items