<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Anand Nalya &#187; facebook</title>
	<atom:link href="http://anandnalya.com/tag/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>http://anandnalya.com</link>
	<description>blog</description>
	<lastBuildDate>Tue, 01 May 2012 10:25:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How Facebook (probably) implements SMS threads</title>
		<link>http://anandnalya.com/2009/11/16/how-facebook-probably-implements-sms-threads/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-facebook-probably-implements-sms-threads</link>
		<comments>http://anandnalya.com/2009/11/16/how-facebook-probably-implements-sms-threads/#comments</comments>
		<pubDate>Mon, 16 Nov 2009 16:14:05 +0000</pubDate>
		<dc:creator>anand</dc:creator>
				<category><![CDATA[Codeprix]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[design]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[sms]]></category>
		<category><![CDATA[text messages]]></category>
		<category><![CDATA[threads]]></category>

		<guid isPermaLink="false">http://anandnalya.com/2009/11/16/how-facebook-probably-implements-sms-threads/</guid>
		<description><![CDATA[A lot of web applications provides you the ability to receive or post updates using SMS (text messages). Twitter is the posterboy of such applications. But the feature that distinguishes Facebook SMS updates from any other service is that you &#8230; <a href="http://anandnalya.com/2009/11/16/how-facebook-probably-implements-sms-threads/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A lot of web applications provides you the ability to receive or post updates using SMS (text messages). Twitter is the posterboy of such applications. </p>
<p>But the feature that distinguishes Facebook SMS updates from any other service is that you can actually reply to individual messages and your message then becomes a part of the aforementioned thread. You don’t have to specify any special command to do so. Just hit the <em>reply&#160; </em>button and you are done. </p>
<p>How do they know which message belongs to which thread? Its simple, each message comes from a different number. For example, say A writes something on your wall, then you will receive a message from +91922305501. Also B sends a message to you, a message comes from +91922305502 and when C comments on your note, you get a message from +91922305503. How many numbers do facebook own? Probably 100 in India, from +91922305500 to +9192230599.&#160; A per user mapping of the number from which the message is sent and the object/thread id for that message is kept on the backend. So when the user replies to a particular number, say +91922305502 , it knows that is was a reply to the message sent by B and hence treats as a reply to that message. A rotation policy is used to decide from which number the message is to be sent. So after recieving a message from +9192230599, the next message will be from +91922305500&#160; and now you cannot reply to the thread represented by the earlier message from the same number.</p>
<p><em>Discalimer:</em> This is just a guess of how this functionality might have been implemented (or at least how I would implement it) and based strictly on SMSes received in India. Actual implementation might (probaly is) be entierly different from what is explained here.</p>
]]></content:encoded>
			<wfw:commentRss>http://anandnalya.com/2009/11/16/how-facebook-probably-implements-sms-threads/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Embedding flash object in Facebook Apps (FBML)</title>
		<link>http://anandnalya.com/2009/01/15/embedding-flash-object-in-facebook-apps-fbml/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=embedding-flash-object-in-facebook-apps-fbml</link>
		<comments>http://anandnalya.com/2009/01/15/embedding-flash-object-in-facebook-apps-fbml/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 03:12:26 +0000</pubDate>
		<dc:creator>anand</dc:creator>
				<category><![CDATA[Codeprix]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[fbml]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[iframe]]></category>

		<guid isPermaLink="false">http://anandnalya.com/?p=30</guid>
		<description><![CDATA[Yesterday I was trying to include a flash object in a facebook app using FBML fb:swf tag. The flash object needed to change the url of the page it was running on on a particular event. But since facebook prevents &#8230; <a href="http://anandnalya.com/2009/01/15/embedding-flash-object-in-facebook-apps-fbml/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was trying to include a flash object in a facebook app using <a href="http://wiki.developers.facebook.com/index.php/FBML">FBML</a> <a href="http://wiki.developers.facebook.com/index.php/Fb:swf">fb:swf</a> tag. The flash object needed to change the url of the page it was running on on a particular event. But since facebook prevents direct script access from flash, this could not be done.</p>
<p>Here is a simple workaround:</p>
<p>1. Create a simple html page containing only the flash object that you want to include.<br />
<div id="gist-1124450" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="nt">&lt;html&gt;</span></div><div class='line' id='LC2'>&nbsp;&nbsp;&nbsp;<span class="nt">&lt;head&gt;</span></div><div class='line' id='LC3'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;meta</span> <span class="na">http-equiv=</span><span class="s">&quot;Content-Type&quot;</span> <span class="na">content=</span><span class="s">&quot;text/html; charset=utf-8&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC4'>&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/head&gt;</span></div><div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;<span class="nt">&lt;body&gt;</span></div><div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;	<span class="nt">&lt;object</span> <span class="na">type=</span><span class="s">&quot;application/x-shockwave-flash&quot;</span> <span class="na">data=</span><span class="s">&quot;foo.swf&quot;</span> <span class="na">width=</span><span class="s">&quot;300&quot;</span> <span class="na">height=</span><span class="s">&quot;300&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;		<span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;movie&quot;</span> <span class="na">value=</span><span class="s">&quot;foo.swf&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	<span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;quality&quot;</span> <span class="na">value=</span><span class="s">&quot;high&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	<span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;scale&quot;</span> <span class="na">value=</span><span class="s">&quot;noscale&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	<span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;salign&quot;</span> <span class="na">value=</span><span class="s">&quot;LT&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC11'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;	<span class="nt">&lt;param</span> <span class="na">name=</span><span class="s">&quot;menu&quot;</span> <span class="na">value=</span><span class="s">&quot;false&quot;</span><span class="nt">&gt;</span></div><div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;	<span class="nt">&lt;/object&gt;</span></div><div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nt">&lt;/body&gt;</span></div><div class='line' id='LC14'><span class="nt">&lt;/html&gt;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1124450/f25326f37d19ebc29bdb4e3e626ef0b209729e45/file.html" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1124450#file_file.html" style="float:right;margin-right:10px;color:#666">file.html</a>
            <a href="https://gist.github.com/1124450">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
<br />
2. Embed this html on the facebook page using the <a href="http://wiki.developers.facebook.com/index.php/Fb:iframe">fb:iframe</a> tag.<br />
<div id="gist-1124450" class="gist">

        <div class="gist-file">
          <div class="gist-data gist-syntax">
              <div class="highlight"><pre><div class='line' id='LC1'><span class="nt">&lt;fb:iframe</span> <span class="na">src=</span><span class="s">&quot;http://anandnalya.com/foo.html&quot;</span> <span class="na">width=</span><span class="s">&quot;300&quot;</span> <span class="na">height=</span><span class="s">&quot;300&quot;</span> <span class="na">frameborder=</span><span class="s">&quot;0&quot;</span> <span class="na">scrolling=</span><span class="s">&quot;no&quot;</span><span class="nt">&gt;&lt;/fb:iframe&gt;</span></div></pre></div>
          </div>

          <div class="gist-meta">
            <a href="https://gist.github.com/raw/1124450/49451e8c78dc71de262d3b2cbcda7d720e4a3360/snippet.html" style="float:right;">view raw</a>
            <a href="https://gist.github.com/1124450#file_snippet.html" style="float:right;margin-right:10px;color:#666">snippet.html</a>
            <a href="https://gist.github.com/1124450">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
        </div>
</div>
</p>
<p>Now you can make all the Actionscript calls you want to. Only caveat to this approach is that you will no longer be able to make Facebook API calls directly from flash.</p>
]]></content:encoded>
			<wfw:commentRss>http://anandnalya.com/2009/01/15/embedding-flash-object-in-facebook-apps-fbml/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
	</channel>
</rss>

