Biz_small Stephane Arcos 17 posts

Hello,
I really enjoy following your book. Impressive work with the model.
There is something I cant figure out, Facebook does not see my css file.

in application.fbml.erb I have :
<%= stylesheet_link_tag “application” %>

looking at the source code that facebook produce, the page try to load the css like that :
http://apps.facebook.com/fbml_static_get.php?src=http://192.168.0.101:3000/stylesheets/application.css

the output of this call is :
new ErrorDialog().showError(“FBML Static Error”,”Failed to fetch required static file”)

Any idea ?

TIA.
Stephane

 
Generic-user-small Spencer Ying 6 posts

Hello,
I’m no expert myself, but fbml doesn’t work when you have your callback from localhost. Instead, you’ll have to find your public IP address and change your callback to that.

Best of luck,
Spencer

 
Head_small Mike Mangino 310 posts

Spencer nailed it. Facebook is trying to fetch the stylesheet from your server and is failing. It looks like the callback_url is incorrect in your facebooker.yml

Mike

 
Biz_small Stephane Arcos 17 posts

thanx guys,
But it work for the rest, fbml does find the images etc… in my local server. its just the css files that is not working.
You’re right, http://192.168.0.101:3000 is my router address not my public IP, but in the app setup (on facebook developer page) I have the callback_url correctly set to my public IP address. Again, it work for the rest, if I change the callback_url parameter in facebooker.yml to my public IP, images does not show anymore.

Stephane.

 
Head_small Mike Mangino 310 posts

The images can be loaded from that address, because they don’t go through Facebook. The callback_url setup that appears to be incorrect is the one in your facebooker.yml file. Can you show us your facebooker.yml? Make sure to remove the secret key before pasting it in.

 
Biz_small Stephane Arcos 17 posts

Sure, thx for your time.

my facebooker.yml :

development:
api_key: 56ebcbc3ea33aa66f842346f8c06773c
secret_key:
canvas_page_name: stephane
callback_url: http://192.168.0.101:3000

My settings at facebook :

API Key 56ebcbc3ea33aa66f842346f8c06773c
Secret
Callback URL http://66.130.xx.xxx:3000/
Canvas URL http://apps.facebook.com/stephane/
FBML/iframe FBML

I know this is strange that my local callback_url does not match the one at facebook. But until the end of chapter five of your book everthing what working fine, I’m able to use FBML directly from my local server, thing I was not able to do before .
So if I understant right, the first request goes to facebook, facebook relay it to my local server and facebook parse the result in the canvas of the application. If I got the FBML working, the setup should be ok ?
What am I missing ?

http://66.130.xx.xxx:3000 is my home router adress and it has port 3000 forwarding to my laptop server at http://192.168.0.101:3000

TIA

 
Head_small Mike Mangino 310 posts

Facebook needs to fetch your css and javascript files to parse them. Facebooker is using the 192… ip address which Facebook can’t access. Up until now, you haven’t done anything that requires communication from Facebook. Your setup has worked so far by accident. While your application is userable by you internally, it would not work from outside your network.

 
Biz_small Stephane Arcos 17 posts

Hum…I understand. This pretty much want I want to do though, doing FBML from my development environment. I was not able to do that with other language, thanx Facebooker !!!
“Up until now, you haven’t done anything that requires communication from Facebook”
this is the part I don’t get because the app is working from my laptop and in FBML mode…
Thank you for your time and your book.

8 posts, 3 voices