[Facebooker-talk] fb_sig_in_iframe=1

Marco Durden marcdurden at gmail.com
Fri Sep 5 18:18:42 EDT 2008


I should have mentioned in my last post that using the no-api fb:iframe link
in my view code actually works.  here is the code in my view:

<fb:iframe src="
http://apps.kitnmedia.com/superrewards/offersdirect.php?h=uyprp" width="640"
height="2200" frameborder="0" scrolling="no" />

This code properly displays the iframe offers.  The fbml in my page source
is correct as follows:

<fb:fbml>
  <a href="http://apps.facebook.com/popularity_poke/offers">Offers</a> <br />
  <fb:iframe src="http://apps.kitnmedia.com/superrewards/offersdirect.php?h=uyprp"
width="640" height="2200" frameborder="0" scrolling="no" />
</fb:fbml>


Any ideas?  Reviews much appreciated.


On Fri, Sep 5, 2008 at 2:58 PM, Marco Durden <marcdurden at gmail.com> wrote:

> Regarding the iframe, here is the fbml in my source:
>
>  <!--Rendering the page using the following FBML retrieved from http://myserver.com:3001/offers
>
> You are seeing this because you are a developer of the application and this information may be useful to you in debugging.  The FBML will not be shown to other users visiting this page.:
>
> <fb:fbml>
>   <a href="http://apps.facebook.com/myserver/offers">Offers</a> <br />
>
>   &lt;fb:iframe src=&quot;http://apps.kitnmedia.com/superrewards/offers.php?uid=153457602&amp;h=mqhjh&quot <http://apps.kitnmedia.com/superrewards/offers.php?uid=153457602&h=mqhjh&quot>; width=&quot;640&quot; height=&quot;2400&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot; /&gt;
>
> </fb:fbml>
> -->
>
>
> When looking at the actual canvas page that my app is located at, this is
> displayed in plain text, but it should actually be the iframe of the offers
> displayed:
>
> <fb:iframe src="http://apps.kitnmedia.com/superrewards/offers.php?uid=
> 153457602&h=mqhjh" width="640" height="2400" frameborder="0"
> scrolling="no" />
>
> I am using shanev's super rewards gem.  Here is my controller code:
>
> app/controllers/offerscontroller.rb
>   def index
>     @offer_code = SuperRewards::Client.offers_display(:fbml,
> current_user.facebook_id)
>   end
>
> Here is my view code
>
> app/views/offers/index.fbml.erb
>
> <%= @offer_code %>
>
>
> For some reason it looks as if the link that should be created from the
> offers_display method is being sanitized.  Not sure if there is a problem
> with the way I set up the gem or if there is a problem with parsing the
> actual link.  It seems the parse.rb file for the gem by shanev has many of
> the same methods as the parse.rb file included in facebooker, although they
> have been extracted to their own Reward module, along with a few other
> unique methods for the gem.  The instructions on how to get the gem
> installed and working are very minimal, as running sudo gem install did not
> work.  I had to download the files and place them in my app.  I am not sure
> if I am supposed to include the files, or require the files, or use some
> other method of getting it working.  So what I did, was placed the files in
> railsapp/lib folder, and I did an "include {ModulesName}" in the
> offerscontroller.  Please let me know if there is a better way of doing
> this.  I did not see a setup.rb file of install.rb file, and I am not sure
> where I would include/require the gem if I were to place it in my gems
> directory.
>
> Here is the development.log data:
>
> Processing OffersController#index (for 127.0.0.1 at 2008-09-05 14:23:42)
> [GET]
>   Session ID: 07c11f9c0erdf193245ff23b-153457602
>   Parameters: {"fb_sig_time"=>"1220649821.887",
> "fb_sig"=>"65d5372a2a37583617db71e93164321b", "fb_sig_in_new_facebook"=>"1",
> "_method"=>"GET", "fb_sig_locale"=>"en_US", "action"=>"index",
> "fb_sig_session_key"=>"07c11f9c0erdf193245ff23b-153457602",
> "fb_sig_position_fix"=>"1", "fb_sig_in_canvas"=>"1",
> "fb_sig_request_method"=>"GET", "controller"=>"offers",
> "fb_sig_expires"=>"0", "fb_sig_added"=>"1", "fb_sig_friends"=>"2134137106",
> "fb_sig_api_key"=>"d34d0eb94f008ba670f8317e0vf3486a", "fb_sig_user"=>"
> 153457602", "fb_sig_profile_update_time"=>"1217562451"}
>   [4;35;1mUser Load (0.000470) [0m   [0mSELECT * FROM users WHERE
> (users."facebook_id" = 153457602) LIMIT 1 [0m
> Rendering template within layouts/application
> Rendering offers/index
> Completed in 0.24300 (4 reqs/sec) | Rendering: 0.00405 (1%) | DB: 0.00047
> (0%) | 200 OK [http://myserver.com/offers]
>
>
> Looking at the log data, there is no mention of fb_sig_in_iframe = 1.
> There are also no errors shown, just a sanitized iframe link.  If you have
> any ideas of what is going wrong here, I would greatly appreciate any
> feedback.
>
> Best
>
>
> On Fri, Sep 5, 2008 at 5:27 AM, Mike Mangino <mmangino at elevatedrails.com>wrote:
>
>> I don't think you send fb_sig_in_iframe to Facebook, I think they send it
>> to you, don't they?
>>
>> When you include fb:iframe inside an FBML tag, Facebook adds an iframe
>> with a URL that points to the source. On the first request, they include all
>> of the normal Facebook parameters. The browser displays the result as HTML.
>>
>> Can you give us an example of what you are seeing and some of the code?
>>
>>
>> On Sep 5, 2008, at 3:35 AM, Marco Durden wrote:
>>
>>  I am using fbml, and need to use <fb:iframe> inside an <fb:fbml> tag.
>>>  This would mean I would need an fb_sig_in_iframe=1 in the signatures sent
>>> to facebook.   When I try to display the <fb:iframe> link on a page, it
>>> displays what should be an iframe inserted into my page as plain text.  When
>>> I view the source of the page, I check the fbml code, and it seems as if the
>>> entire link is sanitized.  I know facebook sanitizes there links, but
>>> displaying an iframe inside fbml seems to be a problem that I can't seem to
>>> figure out.  Has anyone else seen this problem?  I didn't find anywhere in
>>> the facebooker code that uses the fb_sig_in_iframe.  Any ideas are greatly
>>> appreciated.
>>>
>>> Best
>>> _______________________________________________
>>> Facebooker-talk mailing list
>>> Facebooker-talk at rubyforge.org
>>> http://rubyforge.org/mailman/listinfo/facebooker-talk
>>>
>>
>> --
>> Mike Mangino
>> http://www.elevatedrails.com
>>
>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/facebooker-talk/attachments/20080905/8df4c378/attachment.html>


More information about the Facebooker-talk mailing list