<?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>maSnun&#039;s logs &#187; facebook</title>
	<atom:link href="http://masnun.com/blog/tag/facebook/feed/" rel="self" type="application/rss+xml" />
	<link>http://masnun.com/blog</link>
	<description>Personal Blog of maSnun</description>
	<lastBuildDate>Sat, 24 Jul 2010 04:33:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Using The Facebook Graph API with js-sdk : An explanatory Tutorial</title>
		<link>http://masnun.com/blog/2010/05/01/using-the-facebook-graph-api-with-js-sdk-an-explanatory-tutorial/</link>
		<comments>http://masnun.com/blog/2010/05/01/using-the-facebook-graph-api-with-js-sdk-an-explanatory-tutorial/#comments</comments>
		<pubDate>Sat, 01 May 2010 11:06:52 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://masnun.com/blog/?p=916</guid>
		<description><![CDATA[The facebook Graph API has a nice Javascript SDK to build applications using JS. The most important benefit is that with JS you could tightly integrate the Facebook Graph API with your web application. Integration is quite easy. First we &#8230; <a href="http://masnun.com/blog/2010/05/01/using-the-facebook-graph-api-with-js-sdk-an-explanatory-tutorial/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The facebook Graph API has a nice Javascript SDK to build applications using JS. The most important benefit is that with JS you could tightly integrate the Facebook Graph API with your web application.</p>
<p>Integration is quite easy. First we add a fbAsyncInit object to the window object for asynchronous initiating. The following code snippet was borrowed from the official docs and then slightly modified:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">&nbsp;
            window.<span style="color: #660066;">fbAsyncInit</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                FB.<span style="color: #660066;">init</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span>appId<span style="color: #339933;">:</span> appId<span style="color: #339933;">,</span> <span style="color: #000066;">status</span><span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> cookie<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">,</span> xfbml<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                <span style="color: #009966; font-style: italic;">/* All the events registered */</span>
                FB.<span style="color: #660066;">Event</span>.<span style="color: #660066;">subscribe</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'auth.login'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #006600; font-style: italic;">// do something with response</span>
                    login<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                FB.<span style="color: #660066;">Event</span>.<span style="color: #660066;">subscribe</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'auth.logout'</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #006600; font-style: italic;">// do something with response</span>
                    logout<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
                FB.<span style="color: #660066;">getLoginStatus</span><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>response.<span style="color: #660066;">session</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #006600; font-style: italic;">// logged in and connected user, someone you know</span>
                        login<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #003366; font-weight: bold;">var</span> e <span style="color: #339933;">=</span> document.<span style="color: #660066;">createElement</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'script'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                e.<span style="color: #660066;">type</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'text/javascript'</span><span style="color: #339933;">;</span>
                e.<span style="color: #660066;">src</span> <span style="color: #339933;">=</span> document.<span style="color: #660066;">location</span>.<span style="color: #660066;">protocol</span> <span style="color: #339933;">+</span>
                    <span style="color: #3366CC;">'//connect.facebook.net/en_US/all.js'</span><span style="color: #339933;">;</span>
                e.<span style="color: #660066;">async</span> <span style="color: #339933;">=</span> <span style="color: #003366; font-weight: bold;">true</span><span style="color: #339933;">;</span>
                document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'fb-root'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">appendChild</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
           <span style="color: #003366; font-weight: bold;">function</span> login<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
           <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'login'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
           <span style="color: #009900;">&#125;</span>
&nbsp;
           <span style="color: #003366; font-weight: bold;">function</span> logout<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
           <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'logout'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
           <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Thanks to the elegance of Javascript, we called the newly constructed object immediately after initiating, with a callback that loaded the JS sdk on our page. We registered the auth.login, auth.logout events and for initially looking for any logged in user, we made the getLoginStatus()  call. In fact this code snippet initiates the facebook access on the page. Registering the events to our custom functions, we just made sure that, we know when something important happens. While iniating, if the user is already logged in, the login() function gets called  because of the getLoginStatus() call. Later, after initiating, if the user logs in or logs out, the auth.login and auth.logout events get fired. Our registered handlers will be called in those cases.</p>
<p>To make things easy for the end user, you can use a fb:login-button tag from FBML. I believe Facebook app developers are already aware of that. Still, I was just reminding that you can still use those tags <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  A login button is going to help you. Because, it&#8217;s mandatory that you call the FB.login() on an user event (like button click) because most browsers won&#8217;t allow opening a popup on a non-user event.</p>
<p>Now the user is logged in and authorized the apps, you can start customizing your contents for the user. You can always check for available users by calling the FB.getSession() function. It returns null if no user is available, otherwise, it returns a session object with access_token, app key and secret and most importantly the user uid.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">session <span style="color: #339933;">=</span> FB.<span style="color: #660066;">getSession</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
<span style="color: #000066; font-weight: bold;">if</span><span style="color: #009900;">&#40;</span>session<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>session.<span style="color: #660066;">uid</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
     <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'no user logged in'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>You can use the dir() function on the session object to explore it on the Firebug console. </p>
<p>Now, you can make calls to the Graph API using the normal path pattern:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;">FB.<span style="color: #660066;">api</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;/me/photos&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span>response.<span style="color: #660066;">data</span><span style="color: #009900;">&#91;</span><span style="color: #CC0000;">0</span><span style="color: #009900;">&#93;</span>.<span style="color: #660066;">link</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The above code will alert() the user&#8217;s latest photo URI. Well, make sure that the applicaton has permissions to make the calls.</p>
<p>You can even mix up with the legacy API by passing an object with a &#8220;method&#8221; parameter pointing to the method name and related args. You can build the Facbook UIs using the FB.ui() call. Have a look how we use legacy API and UI to build a nifty sharing dialog box.</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> share <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span>
   method<span style="color: #339933;">:</span> <span style="color: #3366CC;">'stream.share'</span><span style="color: #339933;">,</span>
   u<span style="color: #339933;">:</span> <span style="color: #3366CC;">'http://masnun.com/'</span>
 <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
 FB.<span style="color: #660066;">ui</span><span style="color: #009900;">&#40;</span>share<span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> console.<span style="color: #660066;">log</span><span style="color: #009900;">&#40;</span>response<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Here, instead of alert()ing the response, we logged it to the console <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>In this way, you can interact with the user the way you want. It&#8217;s plain and simple. So, start digging now and have fun.</p>
<p>The Offcial js-sdk docs can be found here: <a href="http://developers.facebook.com/docs/reference/javascript/">http://developers.facebook.com/docs/reference/javascript/</a></p>
<p>Happy developing! Happy Facebooking! <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2010/05/01/using-the-facebook-graph-api-with-js-sdk-an-explanatory-tutorial/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using the Facebook Graph API</title>
		<link>http://masnun.com/blog/2010/04/30/using-the-facebook-graph-api/</link>
		<comments>http://masnun.com/blog/2010/04/30/using-the-facebook-graph-api/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 20:20:01 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://masnun.com/blog/?p=902</guid>
		<description><![CDATA[I caught viral fever and decided to take the day off from work. To pass my leisure I decided to play with the Facebook APIs. I noticed that Facebook Platform has changed a lot. They have released the new &#8220;php-sdk&#8221; &#8230; <a href="http://masnun.com/blog/2010/04/30/using-the-facebook-graph-api/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I caught viral fever and decided to take the day off from work. To pass my leisure I decided to play with the Facebook APIs. I noticed that Facebook Platform has changed a lot. They have released the new &#8220;php-sdk&#8221; to let the devlopers integrate facebook into their own sites. Actually, they have released SDKs for other languages too (namely Python and JS). For playing with the toys at hand, I picked up the php-sdk and started browsing through the docs. Amazingly, Facebook has launched OAuth support. I am very happy about that. I no longer need to run my applications inside the facebook frame. Rather I can customize my contents for the facebook users. This is plain cool!</p>
<p>I downloaded the php-sdk and started off. But soon, I faced problem. The php-sdk is not well documented (in my opinion) and I had a very hard time figuring things out. It became even worse when I failed to test some of the features which are tightly integrated deep inside facebook. For example, I couldn&#8217;t find a way to construct some advanced URLs and also the sdk was not suitable for my debugging needs. The sdk is not poor, I later found it out to be strong but the main problem is it&#8217;s not much documented.</p>
<p>So, to try out things and to figure out how the Facebook OAuth works, I started writing my own codes. That helped though I struggled a bit to setup permissions. When I saw that the code is working fine, I chose to pack it up in a class file and rewrite the testing environment.</p>
<p>It took me 30 minutes to rewrite everything up. The package now contains the library and a console to test different methods.</p>
<p>You can download it from: <a href="http://masnun.googlecode.com/files/facebook-graph_API-oauth.zip">http://masnun.googlecode.com/files/facebook-graph_API-oauth.zip</a></p>
<p>Extract it into a directory on your website. Register a facebook application. Go through the traditional setup. Please remember to add your domain name on the Connect tab of the application you created <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Edit the config.php and visit the index.php using your browser. You&#8217;ll be redirected to Facebook without a word. When you authorize and return, you get a fine console to test things out and see for yourself! <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Lets see a quick intro to the library (facebook.php) <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Facebook requires you to redirect the user to an authorization URL with your client id and the callback url. So, we first do this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Construct a Facebook object with your app id and secret</span>
<span style="color: #000088;">$facebook</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Facebook<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client_id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$client_secret</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Get the authorization url. $perms is an array of extended permission. See config.php</span>
<span style="color: #000088;">$url</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$facebook</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAuthorizeUrl</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$callback_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$perms</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">// Redirect the user to that url</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Location: <span style="color: #006699; font-weight: bold;">{$url}</span> &quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>You have to ask for permissions on Authorization. I couldn&#8217;t get to make the user extend permissions on the post authorization phase. So, I have included **ALL** available permissions in the config.php. Permission is what I suffered with most. If you use my library, it&#8217;ll ask the user for all permissions so that you can test everything out. I know you won&#8217;t need all those permissions in production environment. Just comment out the ones you don&#8217;t want! </p>
<p>Facebook returns the user to the $callback_url with a GET parameter named &#8220;code&#8221; with others. By using this code with the application secret and callback url, we can get the access_token for the user <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  We can do that easily using the client :</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$facebook</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Facebook<span style="color: #009900;">&#40;</span><span style="color: #000088;">$client_id</span><span style="color: #339933;">,</span> <span style="color: #000088;">$client_secret</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$facebook</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getAccessToken</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$callback_url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$code</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$facebook</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setAccessToken</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'access_token'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$response</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$facebook</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">call_api</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/me/feed&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;post&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;message=Hello, Facebook!&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$response</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>getAccessToken() retrieves the access_token from the facebook server. setAccessToken() adds the token to the facebook object and makes it ready to make api calls.</p>
<p>The $data is an array with the keys &#8211; access_token and expires. After we set the access token, we can make API calls from the client. For the details on API Paths, please visit: <a href="http://developers.facebook.com/docs/api">http://developers.facebook.com/docs/api</a> <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I really liked the new structure of the facebook API. The previous API was bloated and sometimes very hard to implement. I do thank Facebook very much for making things easy for the developers! </p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2010/04/30/using-the-facebook-graph-api/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Facebook Integration to Mobile Web App</title>
		<link>http://masnun.com/blog/2009/08/29/facebook-integration-to-mobile-web-app/</link>
		<comments>http://masnun.com/blog/2009/08/29/facebook-integration-to-mobile-web-app/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 11:40:55 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://masnun.com/?p=476</guid>
		<description><![CDATA[I feel so happy today &#8212; at this very moment ! I have been finally able to integrate Facebook into my mobile site &#8212; http://jotil21.net. It&#8217;s been a mobile community site running on the J21Community software I wrote back at &#8230; <a href="http://masnun.com/blog/2009/08/29/facebook-integration-to-mobile-web-app/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I feel so happy today &#8212; at this very moment ! I have been finally able to integrate Facebook into my mobile site &#8212; http://jotil21.net. It&#8217;s been a mobile community site running on the J21Community software I wrote back at my college life.</p>
<p>I have been thinking of adding some sort of social interaction to it for a long time but never I got that much time. Today afternoon, I felt a dashing urge to do something with the facebook developers API. I started learning the basics of the API and soon gathered adequate knowledge to start writing an app. But I couldn&#8217;t come up with a good idea to implement. So I chose to integrate facebook with my mobile site.</p>
<p>First of all, I went through the R&#038;D to find out which API calls I might need. Hopefully, there were only a few those would be required for what I wanted to do. So I registered a new app and fired off into coding.</p>
<p>The design is very simple. The app would collect the user&#8217;s unique facebook user ID and store in my database against a JOTIL21 username. You have to perform this linking action using your J21 ID and Password. Once your credentials are verified, your unique facebook id is stored into my database and linked with the corresponding J21 ID.</p>
<p>Now, to let J21 update your status for you, you need to allow special &#8220;extended permission&#8221;. So after successful link up, you&#8217;re provided with an URL to authorize that bit. Now, you&#8217;re totally done.</p>
<p>For this I used the official php5 facebook client library and used iframe as the default rendering method. The client uses an user&#8217;s unique facebook ID to to update his status using the $facebook->users_setStatus(&#8220;Status&#8221;,&#8221;Facebook_User_ID&#8221;) method.</p>
<p>It was really cool but looks like I am forgetting WML coding these days. Had to mess up a lot with the syntax. But finally, it&#8217;s running fine. It&#8217;s still in a beta mode, just a proof-of-concept that WML apps can have facebook connection as well.</p>
<p>Well, enough of that today. Gotta go for Iftari&#8230; Hope to write more on these topics really soon <img src='http://masnun.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2009/08/29/facebook-integration-to-mobile-web-app/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Facebook uses Bing for web search</title>
		<link>http://masnun.com/blog/2009/08/12/facebook-uses-bing-for-web-search/</link>
		<comments>http://masnun.com/blog/2009/08/12/facebook-uses-bing-for-web-search/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 13:30:57 +0000</pubDate>
		<dc:creator>masnun</dc:creator>
				<category><![CDATA[Blog Post]]></category>
		<category><![CDATA[bing]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[search]]></category>

		<guid isPermaLink="false">http://masnun.com/2009/08/12/facebook-uses-bing-for-web-search/</guid>
		<description><![CDATA[Have you checked out the new Facebook search page recently? Facebook has added a good number of search options including the abilities to search your connections, people and posts of your friends. There&#8217;s an additional &#8220;web search&#8221; option that lets &#8230; <a href="http://masnun.com/blog/2009/08/12/facebook-uses-bing-for-web-search/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Have you checked out the new Facebook search page recently? Facebook has added a good number of search options including the abilities to search your connections, people and posts of your friends.</p>
<p>There&#8217;s an additional &#8220;web search&#8221; option that lets you search the web from inside Facebook. This very search engine is being powered by Microsoft&#8217;s Bing.com.</p>
<p>Bing.com claims itself to be a decision engine that replaced the old Live search. I don&#8217;t know why Facebook went for Bing, may be Microsoft has negotiated to popularize Bing by interacting with the best social networking site on the internet.</p>
<p>Let&#8217;s see how far Bing and Facebook goes together.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=0a0aa5ed-c364-8a1b-93be-7c39ca228935" /></div>
]]></content:encoded>
			<wfw:commentRss>http://masnun.com/blog/2009/08/12/facebook-uses-bing-for-web-search/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
