[Facebooker-talk] Facebooker and existing website?
Tom Lianza
tom at lianza.org
Thu Apr 10 17:21:42 EDT 2008
On Thu, Apr 10, 2008 at 2:01 PM, Prateek Dayal <prateek.dayal at gmail.com>
wrote:
> Hi David
>
> Thanks for the reply (and also for the excellent facebooker_tutorial
> on facebook). I am afraid things just got a bit more complicated for
> me.
>
> > In my experience diving into these types of issues in the Rails source
> tends
> > to be a serious time sync. Can you just change your User class to
> Member or
> > something like that.
>
> On some more inspection, I found out the following
>
> 1. If I start my webserver and browse the website, everything works fine
> 2. If i access the facebook app and then try to browse the website, I
> start getting error for all models that I have. For example, I have a
> group model and I do a Group.find() to load a page and I get an error
> on Facebooker::Group:Class. Looks like everything is being referenced
> as Facebooker::
>
> Could this be related to any facebooker setting? I have a feeling that
> the problem is not about two User class but about everything being
> referenced in Facebooker module
I use the restful_authentication plugin (which I think borrows from
acts_as_authenticated), have a model named "User" and use the facebooker
plugin without these issues, so I am fairly confident they can be resolved.
Are you sure you're not doing a stray "include" of the Facebooker module
somewhere? That's kind of what it sounds like. AuthenticatedSystem is
designed to be used via an 'include' in application.rb, but the facebooker
plugin is not.
Also, FWIW, I did end up creating an evil
twin<http://errtheblog.com/posts/67-evil-twin-plugin>class of
authenticated_system so that I could rewrite how login_from_session
works, and allow it to auto-create facebook users if one is present. If you
think that code would be useful to you, let me know and I can send it to
you. I don't think it would help with this particular problem, though.
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/facebooker-talk/attachments/20080410/e446f79f/attachment-0001.html
More information about the Facebooker-talk
mailing list