# Error when using facebooker

**URL:** <https://www.ruby-forum.com/t/error-when-using-facebooker/180805>\
**Category:** Rails\
**Created:** [December 29, 2009, 3:29pm UTC](https://www.ruby-forum.com/t/error-when-using-facebooker/180805 "2009-12-29T15:29:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fajrian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/43a26b/32.png) [@fajrian](https://www.ruby-forum.com/u/fajrian)\
**Post date:** [December 29, 2009, 3:29pm UTC](https://www.ruby-forum.com/t/error-when-using-facebooker/180805/1 "2009-12-29T15:29:06Z")

</div>

hi all,

i am rails newbie. so, please be merciful if you found this question  
stupid 😃

i want to ADD facebook capability to my project. fyi, my project is  
using prototype and openlayer. the amount of work done (by others)  
using prototype and openlayer is quite large, so that i can’t afford  
to make conflict with those libraries.

for the facebook capability, i use facebooker. when i create the  
prototype (i mean, the small version, not prototype javascript  
library) in a separate (blank) project, facebooker worked fine. but  
when i integrated it to my true project, somehow the page is not  
correctly rendered.

in firebug console, i found some javascript errors. i found that all  
those errors are basically related to prototype. it happens even  
though i have imported the facebooker javascript library to my page.  
for example, this one: “Element.observe is not a function”

anybody here would like to enlighten me? especially about facebooker -  
prototype relationship.

thank you

–

You received this message because you are subscribed to the Google  
Groups “Ruby on Rails: Talk” group.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).

---

<div class="post-metadata">

**Author:** ![fajrian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/43a26b/32.png) [@fajrian](https://www.ruby-forum.com/u/fajrian)\
**Post date:** [December 29, 2009, 10:19pm UTC](https://www.ruby-forum.com/t/error-when-using-facebooker/180805/2 "2009-12-29T22:19:45Z")

</div>

fajrian wrote:

> hi all,
> 
> i am rails newbie. so, please be merciful if you found this question  
> stupid 😃
> 
> i want to ADD facebook capability to my project. fyi, my project is  
> using prototype and openlayer. the amount of work done (by others)  
> using prototype and openlayer is quite large, so that i can’t afford  
> to make conflict with those libraries.
> 
> for the facebook capability, i use facebooker. when i create the  
> prototype (i mean, the small version, not prototype javascript  
> library) in a separate (blank) project, facebooker worked fine. but  
> when i integrated it to my true project, somehow the page is not  
> correctly rendered.
> 
> in firebug console, i found some javascript errors. i found that all  
> those errors are basically related to prototype. it happens even  
> though i have imported the facebooker javascript library to my page.  
> for example, this one: “Element.observe is not a function”
> 
> anybody here would like to enlighten me? especially about facebooker -  
> prototype relationship.

Because of Facebook’s JavaScript munging, you can’t use Prototype.js in  
a Facebook canvas app IIRC (although you can in an iframe app). That’s  
why Facebooker provides facebooker.js in the first place.

Note that this is mostly not a Rails question, and would probably be  
better directed to the Facebook dev forum.

> thank you

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
