<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>Dave Dash</title>
 <link href="http://davedash.com/tag/fbml/atom.xml" rel="self"/>
 <link href="http://davedash.com/tag/fbml"/>
 <updated>2012-01-17T21:54:19-08:00</updated>
 <id>http://davedash.com/</id>
 <author>
   <name>Dave Dash</name>
   <email>dd+atom1@davedash.com</email>
 </author>

 
 <entry>
   <title>FBML and CSS background images</title>
   <link href="http://davedash.com/2007/08/11/fbml-and-css-background-images/"/>
   <updated>2007-08-11T00:00:00-07:00</updated>
   <id>http://davedash.com/2007/08/11/fbml-and-css-background-images</id>
   <content type="html">&lt;p&gt;I've been tediously building out the new &lt;a href=&quot;http://reviewsby.us/&quot;&gt;reviewsby.us&lt;/a&gt; app for Facebook and I ran into some problem when I tried to embed this CSS:&lt;/p&gt;

&lt;div&gt;&lt;textarea name=&quot;code&quot; class=&quot;css&quot;&gt;
input.openid_login {
            background: url(&quot;http://openid.net/login-bg.gif&quot;) no-repeat #fff;
   background-position: 0 50%;
          padding-left: 18px;
}
&lt;/textarea&gt;&lt;/div&gt;


&lt;p&gt;The CSS worked fine, just now background image.  The fix is mentioned in &lt;a href=&quot;http://www.facebook.com/topic.php?uid=2205007948&amp;amp;topic=5140&amp;amp;post=50818&amp;amp;pwstdfy=0434dec4ce75745f05b7396611234b7c#post50818&quot;&gt;this post&lt;/a&gt; which is to repeat the &lt;code&gt;background&lt;/code&gt; statement:&lt;/p&gt;

&lt;div&gt;&lt;textarea name=&quot;code&quot; class=&quot;css&quot;&gt;
input.openid_login {
            background: url(&quot;http://openid.net/login-bg.gif&quot;) no-repeat #fff;
            background: url(&quot;http://openid.net/login-bg.gif&quot;) no-repeat #fff;
   background-position: 0 50%;
          padding-left: 18px;
}
&lt;/textarea&gt;&lt;/div&gt;


&lt;p&gt;Voila, it works.  Hopefully this hack won't be necessary in later versions of the Platform.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>FBML and embedded CMS</title>
   <link href="http://davedash.com/2007/08/04/fbml-and-embedded-cms/"/>
   <updated>2007-08-04T00:00:00-07:00</updated>
   <id>http://davedash.com/2007/08/04/fbml-and-embedded-cms</id>
   <content type="html">&lt;p&gt;[tags]fbml, css, reviewsby.us, partials, symfony, sfFacebookPlatformPlugin[/tags]&lt;/p&gt;

&lt;p&gt;One problem of going the FBML route&lt;sup id=&quot;#fbmlcss_fnr_1&quot;&gt;&lt;a href=&quot;#fbmlcss_fn_1&quot;&gt;1&lt;/a&gt;&lt;/sup&gt; is CSS styles.  You can't link to external style sheets so you need to embed everything.&lt;/p&gt;

&lt;p&gt;I took the liberty of using a partial that contains all the useful CSS that I use in our app.  Now we can just embed it in our layout by doing:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;?php include_partial('sfFacebook/css');?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The following classes are useful:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;.app_content&lt;/code&gt; is the div surrounding the main content of the page.  It gives the canvas some padding (actually it gives itself some margin as not to butt-up against the canvas.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.box&lt;/code&gt; this defines the classic facebook box with a dark blue border at the top and with headers that have the lighter blue background and dark blue text.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.box .header&lt;/code&gt; the header for the box described above.  Use an &lt;code&gt;h2&lt;/code&gt; for the title.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;.box .content&lt;/code&gt; the main content section of a box, has a bit of padding.&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&quot;footnotes&quot;&gt;
&lt;ol&gt;
&lt;li id=&quot;fbmlcss_fn_1&quot;&gt;I'm not completely convinced that the
&lt;a href=&quot;http://reviewsby.us/&quot;&gt;reviewsby.us&lt;/a&gt; app for facebook should be using FBML.

&lt;a href=&quot;#fbmlcss_fnr_1&quot; class=&quot;footnoteBackLink&quot;  title=&quot;Jump back to footnote  in the text.&quot;&gt;&amp;#8617;&lt;/a&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

</content>
 </entry>
 
 <entry>
   <title>Facebook Markup Language: the Dashboard and Action links</title>
   <link href="http://davedash.com/2007/07/25/facebook-markup-language-the-dashboard-and-action-links/"/>
   <updated>2007-07-25T00:00:00-07:00</updated>
   <id>http://davedash.com/2007/07/25/facebook-markup-language-the-dashboard-and-action-links</id>
   <content type="html">&lt;p&gt;[tags]facebook, fbml, apps, reviewsby.us, symfony, sfFacebookPlatformPlugin, plugins[/tags]&lt;/p&gt;

&lt;p&gt;Facebook has the concept of the dashboard:&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://developers.facebook.com/images/fbml_dashboard.gif&quot; alt=&quot;dashboard&quot; /&gt;&lt;/p&gt;

&lt;p&gt;In case the documentation isn't clear, these are where the top buttons for your app go.&lt;/p&gt;

&lt;p&gt;I created the FBMLHelper to help you write links from symfony to facebook.&lt;/p&gt;

&lt;p&gt;The dashboard itself is easy to create:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;fb:dashboard&amp;gt;
&amp;lt;/fb:dashboard&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The links are fairly simple, but if you use &lt;a href=&quot;http://symfony-project.com/&quot;&gt;symfony&lt;/a&gt;...  we like helpers...&lt;/p&gt;

&lt;p&gt;So the &lt;code&gt;FBMLHelper&lt;/code&gt; has an &lt;code&gt;fb_action&lt;/code&gt; method which is similar to &lt;code&gt;link_to&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;?php echo fb_action('My Dining', '@homepage') ?&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Will actually render as:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;a href=&quot;http://apps.facebook.com/reviewsbyus/&quot;&amp;gt;My Dining&amp;lt;/a&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Provided the &lt;code&gt;app_facebook_canvas_url&lt;/code&gt; is set to your canvas url (for example, our's is http://apps.facebook.com/reviewsbyus/).&lt;/p&gt;

&lt;p&gt;This helper takes care of routing and rewriting the URL to something that will work within Facebook's canvas.&lt;/p&gt;

&lt;p&gt;... so start writing some apps.  This plugin will be developed further and I'll try to publish tutorials whenever possible.&lt;/p&gt;
</content>
 </entry>
 

</feed>

