<?xml version="1.0" encoding="utf-8"?>
<!-- generator="wordpress/1.5-beta-1 2005-01-25" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
>

<channel>
	<title>STR8BLOGGIN</title>
	<link>http://www.str8bloggin.com</link>
	<description>Just another WordPress weblog</description>
	<pubDate>Sat, 28 Aug 2010 18:20:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5-beta-1 2005-01-25</generator>

		<item>
		<title>How a Facebook app can change its own tab name</title>
		<link>http://www.str8bloggin.com/?p=5428</link>
		<comments>http://www.str8bloggin.com/?p=5428#comments</comments>
		<pubDate>Sat, 28 Aug 2010 13:20:42 +0000</pubDate>
		
	<category>Uncategorized</category>
	<category>Things that beep and buzz</category>
		<guid>http://www.str8bloggin.com/?p=5428</guid>
		<description><![CDATA[The mysterious admin.setAppProperties holds all the secrets. ]]></description>
			<content:encoded><![CDATA[	<p>The mysterious <a href="http://developers.facebook.com/docs/reference/rest/admin.setAppProperties">admin.setAppProperties</a> holds all the secrets.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.str8bloggin.com/wp-commentsrss2.php?p=5428</wfw:commentRSS>
	</item>
		<item>
		<title>How to determine who installed your Facebook app in a tab</title>
		<link>http://www.str8bloggin.com/?p=5426</link>
		<comments>http://www.str8bloggin.com/?p=5426#comments</comments>
		<pubDate>Fri, 27 Aug 2010 15:25:47 +0000</pubDate>
		
	<category>Things that beep and buzz</category>
	<category>Things that wail piteously</category>
		<guid>http://www.str8bloggin.com/?p=5426</guid>
		<description><![CDATA[As any Facebook developer knows, Facebook has some restrictive ideas about permissions and what apps should be allowed to do on your behalf or even know about you. One consequence of this is that Facebook avoids giving you any information about the user who is interacting with your app in a tab. The session data you are given will contain the page's id (known as profile_id in the decoded signed_request value) but not the user's id. The user's id is available when people interact with your app outside of a page tab, but that doesn't help when it's in a tab.
Aside: New developers, always remember that Facebook gives you more or less access to the platform depending on how the ...]]></description>
			<content:encoded><![CDATA[	<p>As any Facebook developer knows, Facebook has some restrictive ideas about permissions and what apps should be allowed to do on your behalf or even know about you. One consequence of this is that <b>Facebook avoids giving you any information about the user who is interacting with your app in a tab</b>. The session data you are given will contain the page&#8217;s id (known as <code>profile_id</code> in the decoded <code>signed_request</code> value) but not the user&#8217;s id. The user&#8217;s id is available when people interact with your app <b>outside of a page tab</b>, but that doesn&#8217;t help when it&#8217;s in a tab.</p>
	<p><i>Aside:</i> New developers, always remember that Facebook gives you more or less access to the platform depending on <i>how</i> the app is being used. If your code doesn&#8217;t seem to work when running in a tab, try running it directly through the canvas at <code>http://apps.facebook.com/[app-name]/</code>. If it works there, you probably have some permissions weirdness going on.</p>
	<p>So, how do you determine the user id of the person who installed your Facebook app as a tab on their fan page?</p>
	<p>There are three ways to do this that I&#8217;m aware of. If I missed anything, let me know.</p>
	<ol>
	<li> Some confusing combination of access permissions, session keys, and page.info and page.isAdmin. I have no idea how to get this working reliably from a tab without requesting extended permissions. If anyone does, please give me a specific example.</li>
	<li> Maintain a table of installed app state, called something like <code>app_installs</code>. In there, track page ids that have installed the app, saving all the information you can find about them. Create a setup or edit page, and put that in the <code>Edit URL</code> field of your Application Settings. When your app is loaded, check that <code>app_installs</code> table to see if a record already exists for the page id (<code>profile_id</code> in <code>signed_request</code>). If it doesn&#8217;t, instruct the user to click the Edit Page link, then find your app and click Edit. Your app will run in canvas, as the user who admins the page, with both the <code>profile_id</code> and <code>user_id</code> variables available to you! Store this information, update the <code>app_installs</code> table, and you&#8217;re good to go! This might also be a good place to do some queries against the <code>page</code> and <code>user</code> FQL tables and store the information in your local table. </li>
	<li> Basically the same as above, but use an <code>&lt;fb:visible-to-owner&gt;&gt;a href="[encoded_secure_edit_url]"&gt;Click here to finish setting up the app&lt;/a&gt;&lt;/fb:visible-to-owner&gt; construct to build a secure edit URL (perhaps based on a session key or md5'd profile_id/APP_SECRET combination). Facebook will only show this link to the page admins, and then you will be able to get the rest of the user information after the click. </code></li>
	</ol>
	<p>
Hope this helps some struggling Facebook App developers!
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.str8bloggin.com/wp-commentsrss2.php?p=5426</wfw:commentRSS>
	</item>
		<item>
		<title>The evils of fb:tabs</title>
		<link>http://www.str8bloggin.com/?p=5425</link>
		<comments>http://www.str8bloggin.com/?p=5425#comments</comments>
		<pubDate>Wed, 25 Aug 2010 21:20:03 +0000</pubDate>
		
	<category>Things that beep and buzz</category>
		<guid>http://www.str8bloggin.com/?p=5425</guid>
		<description><![CDATA[The &lt;fb:tabs&gt; and &lt;fb:tab-item&gt; FBML tags are very handy to use in your Facebook apps if you want to maintain the Facebook appearance. Unfortunately, they also have weird target behavior that causes the user to leave your application's frame - if it's an FBML canvas tab app, and you want to keep your app inside the tab for layout reasons, this is bad news.
To fix it, consider emulating the appearance of Facebook's &lt;fb:tabs&gt; using CSS.. read on for our solution.


.fb-tabs { border-bottom: 1px solid #898989; padding: 3px 0; }
.fb-tabs .left_tabs { float: left; padding-left: 10px; }
.fb-tabs .right_tabs { float: right; padding-right: 10px; }
.fb-tabitems {
display: inline;
list-style: none;
margin: 0;
padding: 0;
text-align: center;
}
.fb-tabitems li {
display:inline;
padding: 2px 0px 3px;
background: #f1f1f1 url(http://www.facebook.com/images/components/toggle_
tab_gloss.gif) top left repeat-x;
}
.fb-tabitems li ...]]></description>
			<content:encoded><![CDATA[	<p>The &lt;fb:tabs&gt; and &lt;fb:tab-item&gt; FBML tags are very handy to use in your Facebook apps if you want to maintain the Facebook appearance. Unfortunately, they also have weird <code>target</code> behavior that causes the user to leave your application&#8217;s frame - if it&#8217;s an FBML canvas tab app, and you want to keep your app inside the tab for layout reasons, this is bad news.</p>
	<p>To fix it, consider emulating the appearance of Facebook&#8217;s &lt;fb:tabs&gt; using CSS.. read on for our solution.</p>
	<p><a id="more-5425"></a></p>
	<p>
<code>
<pre>.fb-tabs { border-bottom: 1px solid #898989; padding: 3px 0; }
.fb-tabs .left_tabs { float: left; padding-left: 10px; }
.fb-tabs .right_tabs { float: right; padding-right: 10px; }
.fb-tabitems {
display: inline;
list-style: none;
margin: 0;
padding: 0;
text-align: center;
}
.fb-tabitems li {
display:inline;
padding: 2px 0px 3px;
background: #f1f1f1 url(http://www.facebook.com/images/components/toggle_
tab_gloss.gif) top left repeat-x;
}
.fb-tabitems li a {
border: 1px solid #898989;
color: #333;
font-weight: bold;
padding: 2px 8px 3px 9px;
}
.fb-tabitems li a small { font-size: 11px; font-weight: normal; }
.fb-tabitems li a:focus { outline: 0px; }
.fb-tabitems li.first a { border:1px solid #898989; }
.fb-tabitems li a.selected {
background: #6d84b4;
border: 1px solid #3b5998;
border-left: 1px solid #5973a9;
border-right: 1px solid #5973a9;
color: #fff;
margin-left: -1px;
}
.fb-tabitems li.last a.selected {
margin-left:-1px;
border-left:1px solid #5973a9;
border-right:1px solid #36538f;
}
.fb-tabitems li.first a.selected {
margin: 0;
border-left: 1px solid #36538f;
border-right: 1px solid #5973a9;
}
.fb-tabitems li.first.last a.selected { border: 1px solid #36538f; }
.fb-tabitems li a.selected:hover { text-decoration: none; }</pre>
</code>
</p>
	<p>Use it like this:</p>
	<p><code>
<pre>
&lt;div class=\"fb-tabs clearfix\"&gt;
&lt;center&gt;
&lt;div class=\"left_tabs\"&gt;
&lt;ul class=\"fb-tabitems clearfix\"&gt;
&lt;li&gt;&lt;a href=\"#\" class=\"selected\"&gt;NavbarLink1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=\"#\"&gt;NavbarLink2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=\"#\"&gt;NavbarLink3&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div class=\"right_tabs\"&gt;
&lt;ul class=\"fb-tabitems clearfix\"&gt;
&lt;li&gt;&lt;a href=\"#\"&gt;NavbarLink1Right&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=\"#\"&gt;NavbarLink2Right&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/center&gt;
&lt;/div&gt;</pre>
</code></p>
]]></content:encoded>
			<wfw:commentRSS>http://www.str8bloggin.com/wp-commentsrss2.php?p=5425</wfw:commentRSS>
	</item>
		<item>
		<title>Incoming: Facebook App Developer tips</title>
		<link>http://www.str8bloggin.com/?p=5424</link>
		<comments>http://www.str8bloggin.com/?p=5424#comments</comments>
		<pubDate>Wed, 25 Aug 2010 20:51:52 +0000</pubDate>
		
	<category>Things that beep and buzz</category>
		<guid>http://www.str8bloggin.com/?p=5424</guid>
		<description><![CDATA[I'm doing a lot of Facebook App development lately, and I'm finding the internet to be sorely lacking in good resources for a lot of this stuff. So on this blog in the coming weeks I'm going to feature a few tips for the greater good of the web. ]]></description>
			<content:encoded><![CDATA[	<p>I&#8217;m doing a lot of Facebook App development lately, and I&#8217;m finding the internet to be sorely lacking in good resources for a lot of this stuff. So on this blog in the coming weeks I&#8217;m going to feature a few tips for the greater good of the web.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.str8bloggin.com/wp-commentsrss2.php?p=5424</wfw:commentRSS>
	</item>
		<item>
		<title>The dog that funk built</title>
		<link>http://www.str8bloggin.com/?p=5250</link>
		<comments>http://www.str8bloggin.com/?p=5250#comments</comments>
		<pubDate>Thu, 20 Mar 2008 01:18:58 +0000</pubDate>
		
	<category>Things that wail piteously</category>
		<guid>http://www.str8bloggin.com/?p=5250</guid>
		<description><![CDATA[Editor's note: This is actually a very old post, from around May of 2005 if I recall. I'm making it live now because it was too painful to make live before, but the attic needs to be swept out from time to time. I'm writing this even though Coco St. Coco doesn't read my site that often. I don't think he's really feeling the whole blogging craze. I'm hoping that maybe they have internet cafes in doggy heaven and they don't filter the websites of atheists. 
 I don't know if this is an obituary. You've been gone for almost a week. You could come back but a part of me lost hope. I stopped leaving the back door open ...]]></description>
			<content:encoded><![CDATA[	<p><i>Editor&#8217;s note:</i> This is actually a very old post, from around May of 2005 if I recall. I&#8217;m making it live now because it was too painful to make live before, but the attic needs to be swept out from time to time.</p>
	<p> I&#8217;m writing this even though Coco St. Coco doesn&#8217;t read my site that often. I don&#8217;t think he&#8217;s really feeling the whole blogging craze. I&#8217;m hoping that maybe they have internet cafes in doggy heaven and they don&#8217;t filter the websites of atheists. </p>
	</p>
	<p> I don&#8217;t know if this is an obituary. You&#8217;ve been gone for almost a week. You could come back but a part of me lost hope. I stopped leaving the back door open in case you found your way home. It&#8217;s locked now. All the flyers we put up &#8212; hundreds of them &#8212; have fallen down cuz of these torrential rains. Did the rains keep you in the bushes, under cars, causing us to not spot you as we wandered the blocks of this new neighborhood endlessly, such a poor way to familiarize myself with it. </p>
	<p> You were the only A+ on the <a href="http://www.str8bloggin.com/?p=5158">list of things I own</a>. For two years, you were my best friend. You understood me more than anyone, which is to say you didn&#8217;t understand me at all, which is still more than anyone. The stairs in this big new house &#8212; the one that freaked you out so bad you had to run away &#8212; aren&#8217;t the same without the sounds of your little claws clittering up ahead of me, ten times faster though you&#8217;re ten times smaller.</p>
	<p> My favorite memory of you is from early on. We went to Green Streets in The Grove and you ate so much bread and veal (so cruel) and so much other shit. You ate more than your own weight. When we got up to leave, you ran into the restaurant and to the horror of everyone around took a big shit right inside the door. An act of pure uncaring defiance. Those are the moments I remember most. </p>
	<p> I don&#8217;t know if you&#8217;re dead or if you&#8217;re bringing the same joy to another family that you brought to mine. In any case, I love you and I will never forget you. I&#8217;ll keep some food around in case you decide to come home.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.str8bloggin.com/wp-commentsrss2.php?p=5250</wfw:commentRSS>
	</item>
		<item>
		<title>Secure browser sessions by proxying through SSH</title>
		<link>http://www.str8bloggin.com/?p=5422</link>
		<comments>http://www.str8bloggin.com/?p=5422#comments</comments>
		<pubDate>Tue, 08 May 2007 18:26:44 +0000</pubDate>
		
	<category>Things that beep and buzz</category>
		<guid>http://www.str8bloggin.com/?p=5422</guid>
		<description><![CDATA[
Download Putty and Puttygen
Run Puttygen
Create a private key; save it somewhere on your harddrive. Don't bother with encrypting/passwording it.
Copy the public key (shown in the box) with Ctrl-C
Login to the server you want to proxy through, as normal, with Putty
Edit .ssh/authorized_keys - you may have to create the .ssh folder
Paste your public key on one long line into the file and then log out of the server
Load your Putty settings for the site
On the left, go to Connection -> Data and enter your username where it says "Autologin Username"
On the left, go to Connection -> SSH -> Auth, and select your private key
On the left, go to Connection -> SSH -> Tunnels, type source port 1080 (or whatever you want), ...]]></description>
			<content:encoded><![CDATA[	<ol>
	<li>Download Putty and Puttygen
</li>
	<li>Run Puttygen
</li>
	<li>Create a private key; save it somewhere on your harddrive. Don&#8217;t bother with encrypting/passwording it.
</li>
	<li>Copy the public key (shown in the box) with Ctrl-C
</li>
	<li>Login to the server you want to proxy through, as normal, with Putty
</li>
	<li>Edit .ssh/authorized_keys - you may have to create the .ssh folder
</li>
	<li>Paste your public key on one long line into the file and then log out of the server
</li>
	<li>Load your Putty settings for the site
</li>
	<li>On the left, go to Connection -> Data and enter your username where it says &#8220;Autologin Username&#8221;
</li>
	<li>On the left, go to Connection -> SSH -> Auth, and select your private key
</li>
	<li>On the left, go to Connection -> SSH -> Tunnels, type source port 1080 (or whatever you want), &#8220;dynamic&#8221; remote, and click &#8220;Add&#8221;
</li>
	<li>Go back to the main settings panel and be sure to save your settings
</li>
	<li>Doubleclick the settings; you should login automatically without a password
</li>
	<li>Go into your Firefox and select localhost:1080 as the SOCKS proxy for all your connections.
</li>
</ol>
]]></content:encoded>
			<wfw:commentRSS>http://www.str8bloggin.com/wp-commentsrss2.php?p=5422</wfw:commentRSS>
	</item>
		<item>
		<title>Birds are smart</title>
		<link>http://www.str8bloggin.com/?p=5421</link>
		<comments>http://www.str8bloggin.com/?p=5421#comments</comments>
		<pubDate>Mon, 07 May 2007 13:11:17 +0000</pubDate>
		
	<category>Things that cause confusion or sadness</category>
		<guid>http://www.str8bloggin.com/?p=5421</guid>
		<description><![CDATA[The complex intellect of ravens has me rethinking my recent dietary changes to be more morality-compliant. I gave up red meat but kept chicken, and I'm starting to think I may have to axe the fowl entirely. Dohhh. ]]></description>
			<content:encoded><![CDATA[	<p><a href="http://www.spiegel.de/international/spiegel/0,1518,476266,00.html">The complex intellect of ravens</a> has me rethinking my recent dietary changes to be more morality-compliant. I gave up red meat but kept chicken, and I&#8217;m starting to think I may have to axe the fowl entirely. Dohhh.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.str8bloggin.com/wp-commentsrss2.php?p=5421</wfw:commentRSS>
	</item>
		<item>
		<title>Goodbye, Digg</title>
		<link>http://www.str8bloggin.com/?p=5420</link>
		<comments>http://www.str8bloggin.com/?p=5420#comments</comments>
		<pubDate>Tue, 01 May 2007 20:23:50 +0000</pubDate>
		
	<category>Things that beep and buzz</category>
		<guid>http://www.str8bloggin.com/?p=5420</guid>
		<description><![CDATA[I don't need you selling your users to your sponsors over a few hex digits. Reddit has a better algorithm anyway.

Oh, and 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0. ]]></description>
			<content:encoded><![CDATA[	<p>I don&#8217;t need you selling your users to your sponsors over a few hex digits. <a href="http://www.reddit.com/">Reddit</a> has a better algorithm anyway.</p>
	<p>Oh, and 09 F9 11 02 9D 74 E3 5B D8 41 56 C5 63 56 88 C0.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.str8bloggin.com/wp-commentsrss2.php?p=5420</wfw:commentRSS>
	</item>
		<item>
		<title>FreeBSD users having trouble with pecl?</title>
		<link>http://www.str8bloggin.com/?p=5419</link>
		<comments>http://www.str8bloggin.com/?p=5419#comments</comments>
		<pubDate>Mon, 29 Jan 2007 00:27:54 +0000</pubDate>
		
	<category>Things that beep and buzz</category>
		<guid>http://www.str8bloggin.com/?p=5419</guid>
		<description><![CDATA[For a while I've had sporadic problems with pecl (PHP's binary module building tool, part of PEAR) not working properly. Usually the error was:
[root@host ~]# pecl install memcache

Fatal error: Call to undefined function preg_match() in /usr/local/share/pear/PEAR/Frontend/CLI.php on line 70
Yet, preg_match() would work from other scripts - it is part of pcre, which was installed.
The problem is this. pcre is included via extensions.ini. That's why it usually works. However, pecl for some reason deliberately turns off .ini file inclusion (that includes extensions.ini) when it runs the php interpreter. I'm not sure what the objective was here but it's a problem on FreeBSD's shared library pcre.so.
The fix: edit the pecl script (usually /usr/local/bin/pecl) and remove the '-n' from the command line arguments. ]]></description>
			<content:encoded><![CDATA[	<p>For a while I&#8217;ve had sporadic problems with pecl (PHP&#8217;s binary module building tool, part of <a href="http://pear.php.net/">PEAR</a>) not working properly. Usually the error was:</p>
	<p><code>
<pre>[root@host ~]# pecl install memcache
	
Fatal error: Call to undefined function preg_match() in /usr/local/share/pear/PEAR/Frontend/CLI.php on line 70</pre>
</code></p>
	<p>Yet, preg_match() would work from other scripts - it is part of pcre, which was installed.</p>
	<p>The problem is this. pcre is included via extensions.ini. That&#8217;s why it usually works. However, pecl for some reason deliberately turns off .ini file inclusion (that includes extensions.ini) when it runs the php interpreter. I&#8217;m not sure what the objective was here but it&#8217;s a problem on FreeBSD&#8217;s shared library pcre.so.</p>
	<p>The fix: edit the pecl script (usually /usr/local/bin/pecl) and remove the &#8216;-n&#8217; from the command line arguments.</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.str8bloggin.com/wp-commentsrss2.php?p=5419</wfw:commentRSS>
	</item>
		<item>
		<title>World&#8217;s Fastest Hummer H1</title>
		<link>http://www.str8bloggin.com/?p=5418</link>
		<comments>http://www.str8bloggin.com/?p=5418#comments</comments>
		<pubDate>Sat, 27 Jan 2007 17:30:45 +0000</pubDate>
		
	<category>Things that strut around sexily</category>
		<guid>http://www.str8bloggin.com/?p=5418</guid>
		<description><![CDATA[Check out this Hummer running the quarter mile in 12.8 seconds: ]]></description>
			<content:encoded><![CDATA[	<p>Check out this Hummer running the quarter mile in 12.8 seconds:<br /><object width="425" height="350"><br />
<param name="movie" value="http://www.youtube.com/v/FPF-rPe0M-M"></param>
<param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/FPF-rPe0M-M" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object>
</p>
]]></content:encoded>
			<wfw:commentRSS>http://www.str8bloggin.com/wp-commentsrss2.php?p=5418</wfw:commentRSS>
	</item>
	</channel>
</rss>
