This is how the tutorial code works.&nbsp; If the request is for a canvas page it will attempt to render index.fbml.erb, otherwise it will render index.html.erb&nbsp; ... no need for a render block.<br><br><div class="gmail_quote">On Fri, Jul 11, 2008 at 5:54 AM, Mike Mangino &lt;<a href="mailto:mmangino@elevatedrails.com">mmangino@elevatedrails.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Are you actually using the format.xml? If not, just remove the whole respond_to block and it will attempt to render index.fbml.erb.<br>
<font color="#888888">
<br>
Mike</font><div><div></div><div class="Wj3C7c"><br>
<br>
On Jul 11, 2008, at 1:13 AM, ÂÞÏö wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
How should I set my controller for fbml? Can you give me an example?<br>
<br>
I just tried &quot;format.fbml&quot;, and failed. Or should I do some configuration?<br>
<br>
2008/7/11, David Clements &lt;<a href="mailto:digidigo@gmail.com" target="_blank">digidigo@gmail.com</a>&gt;: fbml is the format type for canvas requests.<br>
<br>
Dave<br>
<br>
<br>
<br>
On Thu, Jul 10, 2008 at 9:30 PM, ÂÞÏö &lt;<a href="mailto:xiuxiu.luo.xiao@gmail.com" target="_blank">xiuxiu.luo.xiao@gmail.com</a>&gt; wrote:<br>
I just followed <a href="http://apps.facebook.com/facebooker_tutorial/" target="_blank">http://apps.facebook.com/facebooker_tutorial/</a>.<br>
And now I think the root cause is the controller which the tutorial doesn&#39;t mention a lot.<br>
<br>
Now my controller action looks like:<br>
def add_facebook_application<br>
 &nbsp; &nbsp;@users = User.find(:all)<br>
end<br>
It&#39;s fine.<br>
<br>
I used to write my controller like:<br>
def add_facebook_application<br>
 &nbsp; &nbsp;@users = User.find(:all)<br>
 &nbsp; &nbsp;respond_to do |format|<br>
 &nbsp; &nbsp; &nbsp;format.html # index.html.erb<br>
 &nbsp; &nbsp; &nbsp;format.xml &nbsp;{ render :xml =&gt; @users }<br>
 &nbsp; &nbsp;end<br>
end<br>
This version causes the 406 error.<br>
<br>
So What kind of MIME type should I return for the FBML request?<br>
<br>
<br>
2008/7/10 Mike Mangino &lt;<a href="mailto:mmangino@elevatedrails.com" target="_blank">mmangino@elevatedrails.com</a>&gt;:<br>
<br>
Do you have a .fbml.erb template for your action? It looks like Rails doesn&#39;t know how to respond to that request.<br>
<br>
Mike<br>
<br>
<br>
On Jul 10, 2008, at 12:22 AM, ÂÞÏö wrote:<br>
<br>
Current configuration:<br>
api_key: 1cf93933582d5835bebe98d286158273<br>
&nbsp;secret_key: 2863b13fc58f57cae527de45fd4b7f20<br>
&nbsp;canvas_page_name: &nbsp;favoritelink<br>
&nbsp;callback_url: &nbsp;<a href="http://skygroup.heroku.com:80" target="_blank">http://skygroup.heroku.com:80</a><br>
<br>
Facebook Error message:<br>
Errors while loading page from application<br>
Received HTTP error code 406 while loading <a href="http://skygroup.heroku.com/" target="_blank">http://skygroup.heroku.com/</a><br>
<br>
Hosting Logs:<br>
Processing UsersController#index (for <a href="http://204.15.23.168" target="_blank">204.15.23.168</a> at 2008-07-09 21:18:41) [GET] Session ID: 7f20696ddc5efd8ef3998392-830843210<br>
Parameters: {&quot;fb_sig_time&quot;=&gt;&quot;1215663521.2908&quot;, &quot;fb_sig&quot;=&gt;&quot;ffa784e9d1c76353dd88a37625d89562&quot;, &quot;_method&quot;=&gt;&quot;GET&quot;, &quot;fb_sig_locale&quot;=&gt;&quot;en_US&quot;, &quot;action&quot;=&gt;&quot;index&quot;, &quot;fb_sig_session_key&quot;=&gt;&quot;7f20696ddc5efd8ef3998392-830843210&quot;, &quot;fb_sig_position_fix&quot;=&gt;&quot;1&quot;, &quot;fb_sig_in_canvas&quot;=&gt;&quot;1&quot;, &quot;fb_sig_request_method&quot;=&gt;&quot;GET&quot;, &quot;controller&quot;=&gt;&quot;users&quot;, &quot;fb_sig_expires&quot;=&gt;&quot;0&quot;, &quot;fb_sig_friends&quot;=&gt;&quot;2262404,4804216,5249680,9008910,13750643,506937136,520168433,522304594,528043834,529227427,538707016,540922141,542807705,543517145,550351017,555204379,561335842,563186606,566958300,580552312,581167055,581779377,587040751,590419111,590873221,597463133,598249007,598417675,600028743,622739483,630356681,644401706,651304761,654746992,658132952,661102891,665035038,678155312,679629309,686493571,695123717,696545870,702425899,705314598,712999475,723616403,725213313,728613392,737104108,762788417,784900135,795141561,817255113,819588350,831174826,868845223,1019763240,1034498395,1038216447,1042776567,1047188638,1068223901,1070105629,1095256539,1157552746,1207667867,1254027126,1266144372,1270883167,1277082451,1277868215,1281204041,1283784221,1283784227,1303114794&quot;, &quot;fb_sig_added&quot;=&gt;&quot;0&quot;, &quot;fb_sig_api_key&quot;=&gt;&quot;1cf93933582d5835bebe98d286158273&quot;, &quot;fb_sig_profile_update_time&quot;=&gt;&quot;1211120190&quot;, &quot;fb_sig_user&quot;=&gt;&quot;830843210&quot;}<br>

User Load (0.001291) SELECT * FROM users Completed in 0.00914 (109 reqs/sec) | Rendering: 0.00006 (0%) | DB: 0.00129 (14%) | 406 Not Acceptable [<a href="http://skygroup.heroku.com/" target="_blank">http://skygroup.heroku.com/</a>]<br>

<br>
<br>
<br>
ÔÚ08-7-10£¬David Clements &lt;<a href="mailto:digidigo@gmail.com" target="_blank">digidigo@gmail.com</a>&gt; Ð´µÀ£º First thing to try is removing the slashes from the canvas_page_name....<br>
<br>
If that doesn&#39;t help can you send more details from your rails log?<br>
<br>
Dave<br>
<br>
<br>
On Wed, Jul 9, 2008 at 10:00 PM, ÂÞÏö &lt;<a href="mailto:xiuxiu.luo.xiao@gmail.com" target="_blank">xiuxiu.luo.xiao@gmail.com</a>&gt; wrote:<br>
Hi, everyone,<br>
 &nbsp; I am the new one for the facebooker and just created my facebook application.<br>
 &nbsp; I start my first application by following the facebooker_tutorial and use heroku as my host.<br>
 &nbsp; My application works fine in &quot;Iframe&quot; mode, but when I turn to &quot;FBML&quot; mode, I recieved 406 error from my host.<br>
 &nbsp; Does someone has any idea? I think maybe I do something wrong in my facebooker configuration.<br>
<br>
 &nbsp; Here is my facebooker.yml configuration:<br>
 &nbsp; api_key: xxxxxxxxxxxxxxxxxxx<br>
 &nbsp; secret_key: xxxxxxxxxxxxxxxxxxxx<br>
 &nbsp; canvas_page_name: &nbsp;/favoritelink/<br>
 &nbsp; callback_url: &nbsp;<a href="http://skygroup.heroku.com:80" target="_blank">http://skygroup.heroku.com:80</a><br>
<br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
Facebooker-talk mailing list<br>
<a href="mailto:Facebooker-talk@rubyforge.org" target="_blank">Facebooker-talk@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Facebooker-talk mailing list<br>
<a href="mailto:Facebooker-talk@rubyforge.org" target="_blank">Facebooker-talk@rubyforge.org</a><br>
<a href="http://rubyforge.org/mailman/listinfo/facebooker-talk" target="_blank">http://rubyforge.org/mailman/listinfo/facebooker-talk</a><br>
<br>
--<br>
Mike Mangino<br>
<a href="http://www.elevatedrails.com" target="_blank">http://www.elevatedrails.com</a><br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
--<br>
Mike Mangino<br>
<a href="http://www.elevatedrails.com" target="_blank">http://www.elevatedrails.com</a><br>
<br>
<br>
<br>
</div></div></blockquote></div><br>