all of the links to my fbml canvas page are pushing me back to my drupal site. I have the front page pointing to a page view that has exposed filters. the view is displaying fine and the filters work but every link on the site is displayed as
http://mysite.com/node/34?_fb_q=1

I have all of the boxes checked in the canvas page tab. I have also cleared the cache, to no avail. if anyone knows how to fix this let me know.

Comments

poundy’s picture

**bump**

poundy’s picture

Does anyone have an idea on this. I am trying to roll my app out and this is the only thing holding it up.

Dave Cohen’s picture

Try grepping through your code for "_fb_q". I don't see that anywhere in my drupal directory.

Try unchecking the options under "URL processing". Does that fix some of the links?

poundy’s picture

so I could not find _fb_q in an of my files. When I unchecked the url processing it fixed the links, but broke the theme(I am using the DFF theme).

poundy’s picture

So I solved the ?_fb_q mystery. This is the result of setting your canvas page to have quick translation. I was unaware that it was set to on, but know other can know that it is a fb setting on the canvas page tab in your app's settings.

poundy’s picture

I am still not getting the right links on my app. they all are pointing to my drupal site. I have updated to the latest dev and I am still having the same issue.

einnox’s picture

im getting also this issue. When im creating a content it redirect me out of the iframe of facebook. same in skip button and invite friends. I'm using the fb_fbml themes.

i tried playing with the url processing option, but it didnt solve the problem.

poundy’s picture

Bump

Dave Cohen’s picture

What links are affected? Is it really every link, including drupal menus, etc?

poundy’s picture

every link on my app apart from the views filter directs me back to my drupal site. I am able to navigate to what ever page I need by adjusting the url in the browser to the facebook app base url. this is all that remains on my app so any insight to resolve this issue would be super helpful.

poundy’s picture

so the frustration level is reaching critical mass, you've got to love dev. Because the links on the fbml canvas page were not working I decided to render my app as an iframe app. Now the bug is with the iframe size. I have set the canvas page to be smartsize but it loads the app with a scroll bar on the right. when it is set to resizable it loads the page with 800px height and cuts the rest of the app off. I would assume that this issue has come up in others apps, and I would be grateful for a work around.

Dave Cohen’s picture

I don't understand the link issue, so not sure what to say about that.

Facebook has started recommending iframe over FBML, so you're probably better off building a new app that way.

To best support iframe apps, enable the connect module.

Write your own module that implements hook_fb. When $op == init, try something like

  if (fb_is_iframe_canvas()) {
          fb_connect_require_feature("CanvasUtil");
          drupal_add_js("$(document).ready(function() {FB.ensureInit(function() {FB.CanvasClient.startTimerToSizeToContent();});} )", 'inline', 'footer');
}

Let us know if that works. Sorry I don't have an example that does it exactly this way or I'd share the exact code.

Dave Cohen’s picture

BTW, I still dont understand the FBML link problem. There's no guarantee iframes wont have a similar problem. Links are complicated in iframes, too.

poundy’s picture

this didn't work for me. is there anything special I need to do on the page.tpl.php in my theme? at this point I am willing to pay someone to find a solution, and I am willing to share any results with the community.

poundy’s picture

I have found that the link issue has to do with other modules I have installed on the site. I am not quite sure which one is causing the links to act as the are but do to the nature of my site I need all of the modules I have installed with increases my need of implementing an iframe app instead of fbml. I have searched the internet for any idea on how to fix the resizing issue that I am experiencing and I am running into a wall. I am working on tight deadlines and need to get my app out on demo now, and I was wondering if there was a quick fix to set a fixed height so I can see all of the content or some script in the page.tpl.php that will force a resize. I understand the custom module is the best solution because it allows updating without crashing our damaging the site, and I am willing to do what it take to make it happen. if it helps I would let you jump onto my server and take a look around.

poundy’s picture

Title: links breaking » iframe canvas page resizing
Component: Canvas Pages (FBML) » Canvas Pages (iframe)

name change

poundy’s picture

Just posted a job for this issue. http://groups.drupal.org/node/68398

rgs’s picture

I'm in the 3.0 branch but can't quite figure this out. Would you consider sharing or pointing me in the right directions on this? I tried the code above but it just broke my site.

Dave Cohen’s picture

rgs, see http://drupal.org/node/854168#comment-3203304

The approach is different in the 3.x branch.