TabItems in sample MVC app have incorrect URLs

May 23, 2010 at 10:31 PM

I'm trying to get Kevin Marshall's sample MVC app to work.  I'm able to deploy and successfully display tabs, but the link URLs are incorrect.  Here's the code snippet:

<fb:tabs>
  <%= Fbml.TabItem("Home", "index", "home", this.ViewContext) %>
  <%= Fbml.TabItem("Friends", "friends", "home", this.ViewContext) %>
  <%= Fbml.TabItem("Stream", "stream", "home", this.ViewContext) %>
</fb:tabs>

The URLs for "friends" ends up as http://apps.facebook.com/friends instead of http://apps.facebook.com/my_app/friends.  The same goes for the "stream" tab.  My canvas callback URL is http://www.example.com/home

Any ideas?

Jul 27, 2010 at 4:04 AM
I had the same problem. Fixed it by hardcoding the app name into the fbml helper but there'll be a better way to do it, no doubt. In Helpers > Fbml.cs change line 17 to: return String.Format(@"<fb:tab-item href=""/my_app{0}"" title=""{1}"" selected=""{2}"" />", url, tabName, selected);