http://jypsie.com/RFacebook/posts
From Recent Posts | Pages, 1 year ago,
0 comments
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
From Recent Posts | Pages, 1 year ago,
0 comments
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 endreturn 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
From Recent Posts | Pages, 1 year ago,
0 comments
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?
From Recent Posts | Pages, 1 year ago,
0 comments
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.
From Recent Posts | Pages, 1 year ago,
0 comments
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?
From Recent Posts | Pages, 1 year ago,
0 comments
Yeah – this is a problem I’m having as well – I’d love to hear how people are solving it
Mike
From Recent Posts | Pages, 1 year ago,
0 comments
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?
From Recent Posts | Pages, 1 year ago,
0 comments
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
From Recent Posts | Pages, 1 year ago,
0 comments
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”
From Recent Posts | Pages, 1 year ago,
0 comments
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.
From Recent Posts | Pages, 1 year ago,
0 comments
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.
From Recent Posts | Pages, 1 year ago,
0 comments
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.
From Recent Posts | Pages, 1 year ago,
0 comments
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?
From Recent Posts | Pages, 1 year ago,
0 comments
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?
From Recent Posts | Pages, 1 year ago,
0 comments
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.