<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>Social Networks</title><link>http://blogs.x2line.com/al/category/91.aspx</link><description>Pieces of useful information regarding Facebook, Bebo, Friendster, Myspace, Hi5 goes here. Especially developer platforms, APIs and engagement points, evolving. Stay tuned...</description><managingEditor>Anatoly Lubarsky</managingEditor><dc:language>en-US</dc:language><generator>Version 0.97.2006.1</generator><image><url>http://blogs.x2line.com/Images/x2line_logo_feed.jpg</url><title>x2line: Social Network Services, Weblog Hosting</title><link>http://blogs.x2line.com/</link></image><item><dc:creator>Anatoly Lubarsky</dc:creator><title>Outage: Myspace, Friendster, Cubics</title><link>http://blogs.x2line.com/al/archive/2008/11/16/3584.aspx</link><pubDate>Sun, 16 Nov 2008 00:26:00 GMT</pubDate><guid>http://blogs.x2line.com/al/archive/2008/11/16/3584.aspx</guid><wfw:comment>http://blogs.x2line.com/al/comments/3584.aspx</wfw:comment><comments>http://blogs.x2line.com/al/archive/2008/11/16/3584.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.x2line.com/al/comments/commentRss/3584.aspx</wfw:commentRss><trackback:ping>http://blogs.x2line.com/al/services/trackbacks/3584.aspx</trackback:ping><description>&lt;p&gt;I don't see anyone blogs about this therefore I have to write about it myself.&lt;/p&gt;&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;Friendster is offline for more than 36 hours out of last 48 and it is still offline right now.&lt;/li&gt;
&lt;li&gt;Myspace applications are "down for maintenance" for more than 10 hours now and counting...&lt;/li&gt;
&lt;li&gt;Cubics is down for maintenance. Obviously cubics takes advantage on myspace and friendster outage to fix their stuff. Hope so...&lt;/li&gt;
&lt;li&gt;Google Adsense has had unstable reporting during yesterday. Google Adsense was not available at all for 1 hour and has had some delay reporting clicks while reporting impressions from midnight PST.&lt;/li&gt;
&lt;/ul&gt;&lt;br&gt;
&lt;p&gt;Myspace and Friendster folks — this is so unprofessional. Sad :(&lt;/p&gt;&lt;img src ="http://blogs.x2line.com/al/aggbug/3584.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Anatoly Lubarsky</dc:creator><title>Does Facebook Platform Matter Anymore?</title><link>http://blogs.x2line.com/al/archive/2008/10/18/3570.aspx</link><pubDate>Sat, 18 Oct 2008 04:28:00 GMT</pubDate><guid>http://blogs.x2line.com/al/archive/2008/10/18/3570.aspx</guid><wfw:comment>http://blogs.x2line.com/al/comments/3570.aspx</wfw:comment><comments>http://blogs.x2line.com/al/archive/2008/10/18/3570.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.x2line.com/al/comments/commentRss/3570.aspx</wfw:commentRss><trackback:ping>http://blogs.x2line.com/al/services/trackbacks/3570.aspx</trackback:ping><description>&lt;p&gt;The short answer is no. Short summary:&lt;/p&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Facebook platform does not care about their developers community.&lt;/li&gt;
&lt;li&gt;"Facebook API" is not backward compatible. They deprecate methods every week.&lt;/li&gt;
&lt;li&gt;Facebook platform is overregulated and unfair to a "small guy".&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;p&gt;At the end of the day they will eat their own lunch. It means that they will eventually start to loose money with bad advertising CPMs. Or they already started, didn't they? Thanks god, we (developers) have OpenSocial.&lt;/p&gt;&lt;img src ="http://blogs.x2line.com/al/aggbug/3570.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Anatoly Lubarsky</dc:creator><title>Solution: Social Networks and Client Libraries</title><link>http://blogs.x2line.com/al/archive/2008/08/01/3514.aspx</link><pubDate>Fri, 01 Aug 2008 03:41:00 GMT</pubDate><guid>http://blogs.x2line.com/al/archive/2008/08/01/3514.aspx</guid><wfw:comment>http://blogs.x2line.com/al/comments/3514.aspx</wfw:comment><comments>http://blogs.x2line.com/al/archive/2008/08/01/3514.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.x2line.com/al/comments/commentRss/3514.aspx</wfw:commentRss><trackback:ping>http://blogs.x2line.com/al/services/trackbacks/3514.aspx</trackback:ping><description>&lt;p&gt;In one of my recent posts - &lt;a href="http://blogs.x2line.com/al/archive/2008/07/20/3501.aspx"&gt;Problem: Social Networks and Client Libraries&lt;/a&gt; I tried to define the problem of lack of client libraries written in .NET to support Social Networks open platforms.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Here is my solution - write these libraries myself. The first network will be delicious:&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;I'm selling Client Library for &lt;a href="http://del.icio.us/help/api/"&gt;Delicious API&lt;/a&gt; written in .NET 2.0 (C#).&lt;/p&gt;&lt;br&gt;
&lt;p&gt;&lt;img src="http://l.yimg.com/hr/10308/img/delicious.48px.gif" border="0" /&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Delicious has opened its API for developers long before Facebook.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;.NET developers can either integrate this library into their Facebook or open social applications or create new applications for delicious.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;This library is:&lt;/p&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Up-to-date.&lt;/li&gt;
&lt;li&gt;Very fast.&lt;/li&gt;
&lt;li&gt;Robust (was written about 3 years ago).&lt;/li&gt;
&lt;/ul&gt;&lt;br&gt;
&lt;p&gt;For now the price is:&lt;/p&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;$100 with source code but without reseller rights.&lt;/li&gt;
&lt;li&gt;$150 with source code and reseller rights.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;p&gt;If interested, please send me e-mail: &lt;a href="mailto:anatolyl@gmail.com"&gt;anatolyl@gmail.com&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;My future plan is to release client libraries written in .NET for most important platforms:&lt;/p&gt;&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;Including open-social based platforms (myspace, hi5).&lt;/li&gt;
&lt;li&gt;Including client libraries for Facebook API based platforms.&lt;/li&gt;
&lt;li&gt;Including independent platforms.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;p&gt;&lt;b&gt;Update 1:&lt;/b&gt; I forgot to mention - test project is included for both versions so one can verify the library actually works before creating her own app.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;&lt;b&gt;Update 2:&lt;/b&gt; delicious released delicious 2.0 just yesterday (coincidence ?) - the libraries are supposed to work without any change. I'm planning also to maintain all libraries released to the public.&lt;/p&gt;&lt;img src ="http://blogs.x2line.com/al/aggbug/3514.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Anatoly Lubarsky</dc:creator><title>Thoughts on Facebook New Profile</title><link>http://blogs.x2line.com/al/archive/2008/07/26/3506.aspx</link><pubDate>Sat, 26 Jul 2008 04:39:00 GMT</pubDate><guid>http://blogs.x2line.com/al/archive/2008/07/26/3506.aspx</guid><wfw:comment>http://blogs.x2line.com/al/comments/3506.aspx</wfw:comment><comments>http://blogs.x2line.com/al/archive/2008/07/26/3506.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.x2line.com/al/comments/commentRss/3506.aspx</wfw:commentRss><trackback:ping>http://blogs.x2line.com/al/services/trackbacks/3506.aspx</trackback:ping><description>&lt;p&gt;I think that Facebook New Profile is better than the old one. The most important thing for developers is that it has wide canvas. Here Facebook is catching up with competitors, since Myspace, Hi5, Bebo and Friendster all of them have wide canvas and chrome menu on the top.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;It is cleaner for the users since Facebook has started the process of deprecating profile boxes. Profiles will load faster.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;In order to be ahead of competition Facebook is deprecating "install" concept and changes its API.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;The only thing I'm not happy about new profile is that Facebook platform development team is not familiar with "backward compatibility" term. They are introducing a lot of breaking changes (full of bugs).&lt;/p&gt;&lt;img src ="http://blogs.x2line.com/al/aggbug/3506.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Anatoly Lubarsky</dc:creator><title>Problem: Social Networks and Client Libraries</title><link>http://blogs.x2line.com/al/archive/2008/07/20/3501.aspx</link><pubDate>Sun, 20 Jul 2008 02:18:00 GMT</pubDate><guid>http://blogs.x2line.com/al/archive/2008/07/20/3501.aspx</guid><wfw:comment>http://blogs.x2line.com/al/comments/3501.aspx</wfw:comment><comments>http://blogs.x2line.com/al/archive/2008/07/20/3501.aspx#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://blogs.x2line.com/al/comments/commentRss/3501.aspx</wfw:commentRss><trackback:ping>http://blogs.x2line.com/al/services/trackbacks/3501.aspx</trackback:ping><description>&lt;p&gt;It's not a secret that I have several applications running on Social Network platforms.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Launched initially on Facebook last year several web applications were scaled up to support bebo platform in January this year.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;It was relatively easy since Bebo has had a similar platform (actually they licensed Facebook platform).&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Right now there are at least 5 major networks with API platform open for applications: Facebook, Bebo, Myspace, Hi5 and Friendster. I'm going to scale up my applications to support all of them from the same application canvas and database.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;There are obvious issues involved with such implementation for example standardization:&lt;/p&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Facebook and Bebo are based on Facebook API.&lt;/li&gt;
&lt;li&gt;Facebook is in the middle of the major redesign to its API and user profile.&lt;/li&gt;
&lt;li&gt;Myspace and Hi5 are based on Open Social. In addition both have introduced REST API recently.&lt;/li&gt;
&lt;li&gt;Friendster has its own REST API.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;p&gt;Another issue, which IMHO is more important is the lack of client libraries for languages other than PHP. My applications are .NET based (C# + MSSQL):&lt;/p&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;There are 2 known client libraries for Facebook on the internet written in .NET. Both are not maintained and are written like junk:
    &lt;ul&gt;
    &lt;li&gt;Both are full of bugs and not maintained (not in sync with Facebook frequent changes).&lt;/li&gt;
    &lt;li&gt;Both are designed like applications and not like client libraries for 3rd parties to use.&lt;/li&gt;
    &lt;li&gt;Performance sucks big time.&lt;/li&gt;
    &lt;li&gt;Do not support Facebook recent redesign.&lt;/li&gt;
    &lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;There is no .NET library for Bebo and Friendster. Friendster has official library for java, however it seems like not operational from a brief review. Friendster documentation is not up-to-date.&lt;/li&gt;
&lt;li&gt;There is 1 known library for Myspace written in .NET.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;p&gt;I own 50% of one application written in PHP + MYSQL but it's not going to scale in the near future, not to mention it has not launched yet.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;The problem: how to scale up 3rd party applications written initially for a particular platform to support and run on all other Social Network platforms ?&lt;/p&gt;&lt;img src ="http://blogs.x2line.com/al/aggbug/3501.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Anatoly Lubarsky</dc:creator><title>Facebook's Standard Security Settings Sufficient ? (Not)</title><link>http://blogs.x2line.com/al/archive/2008/05/02/3412.aspx</link><pubDate>Fri, 02 May 2008 04:43:00 GMT</pubDate><guid>http://blogs.x2line.com/al/archive/2008/05/02/3412.aspx</guid><wfw:comment>http://blogs.x2line.com/al/comments/3412.aspx</wfw:comment><comments>http://blogs.x2line.com/al/archive/2008/05/02/3412.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.x2line.com/al/comments/commentRss/3412.aspx</wfw:commentRss><trackback:ping>http://blogs.x2line.com/al/services/trackbacks/3412.aspx</trackback:ping><description>&lt;p&gt;BBC came out with an article today &lt;a href="http://news.bbc.co.uk/2/hi/programmes/click_online/7375772.stm" target="_blank"&gt;Identity 'at risk' on Facebook&lt;/a&gt; which discusses potential stealing of user data by 3rd parties applications of Facebook Development Platform:&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;i&gt;"When you add an application, unless you say otherwise, it is given access to most of the information in your profile. That includes information you have on your friends even if they think they have tight security settings."&lt;/i&gt;&lt;/p&gt;&lt;br /&gt; 
&lt;p&gt;&lt;i&gt;"Did you know that you were responsible for other people's security?"&lt;/i&gt;&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Some Facebook applications developers have found this article misleading and "hilarious" - see the following thread: &lt;a href="http://forum.developers.facebook.com/viewtopic.php?id=14274" target="_blank"&gt;BBC: facebook apps dangerous&lt;/a&gt;.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;However I find the article to be professional and points discussed there to be correct and valuable for the platform.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;One important point developers missing is that the application in question is able to collect user friends data, while these friends are not aware of this application existing at all. No obvious OPT-IN for "friends".&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Your friends don't need to install the application or ever login to it to have the info been collected.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Of course it is possible to not allow applications you haven't installed to get any info at all via user "Privacy Settings" page. Don't want to mention it is not obvious for the user he/she should do it. But are these settings secure "by default" ? I guess - no.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;The BBC article points that out correctly:&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;&lt;i&gt;"He said: "Facebook needs to change its default settings and tighten up security.""&lt;/i&gt;&lt;/p&gt;&lt;br&gt;
&lt;p&gt;"Default Settings" is very important security component of any system or application. In terms of "Default Settings" the good example is Internet Explorer. Think about how many default settings changes have been made in IE during recent years.&lt;/p&gt;&lt;img src ="http://blogs.x2line.com/al/aggbug/3412.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Anatoly Lubarsky</dc:creator><title>Thoughts on Bebo Audience</title><link>http://blogs.x2line.com/al/archive/2008/04/10/3384.aspx</link><pubDate>Thu, 10 Apr 2008 02:17:00 GMT</pubDate><guid>http://blogs.x2line.com/al/archive/2008/04/10/3384.aspx</guid><wfw:comment>http://blogs.x2line.com/al/comments/3384.aspx</wfw:comment><comments>http://blogs.x2line.com/al/archive/2008/04/10/3384.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.x2line.com/al/comments/commentRss/3384.aspx</wfw:commentRss><trackback:ping>http://blogs.x2line.com/al/services/trackbacks/3384.aspx</trackback:ping><description>&lt;p&gt;Since one of my applications - Bathroom Stall Vandalism works both on &lt;a href="http://www.bebo.com/Profile.jsp?MemberId=5409925639"&gt;bebo&lt;/a&gt; and on &lt;a href="http://www.facebook.com/applications/Bathroom_Stall_Vandalism/5180194285"&gt;facebook&lt;/a&gt; as well - it is always useful to compare performance on both platforms. BTW, Bathroom Stall Vandalism is all about people virtually write and vandalize their rest rooms (LOL).&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Need to take in to account that:&lt;/p&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Bebo uses facebook's API model for its platform.&lt;/li&gt;
&lt;li&gt;Facebook platform is more stable right now.&lt;/li&gt;
&lt;li&gt;Facebook platform is more mature and much more competitive.&lt;/li&gt;
&lt;li&gt;The app has the same canvas and database.&lt;/li&gt;
&lt;li&gt;Bathroom Stall Vandalism was initially launched on facebook during october/november 2007 and was scaled up to support bebo in january 2008.&lt;/li&gt;
&lt;/ul&gt;&lt;br /&gt;
&lt;p&gt;&lt;a href="http://www.flickr.com/photos/60703797@N00/2402070300/" title="Bathroom Stall Vandalism - Facebook vs. Bebo"&gt;&lt;img src="http://farm3.static.flickr.com/2107/2402070300_34ea07a8dc.jpg" alt="Bathroom Stall Vandalism - Facebook vs. Bebo" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;One can understand from the screenshot that the app is more popular among bebo users: they spend more time on site, have better bounce rate, etc.&lt;/p&gt;&lt;br /&gt;
&lt;p&gt;Bebo audience is very special: most users are under 18 from UK, Australia and New Zealand.&lt;/p&gt;&lt;img src ="http://blogs.x2line.com/al/aggbug/3384.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Anatoly Lubarsky</dc:creator><title>x2line on Facebook Pages</title><link>http://blogs.x2line.com/al/archive/2007/11/10/3306.aspx</link><pubDate>Sat, 10 Nov 2007 21:47:00 GMT</pubDate><guid>http://blogs.x2line.com/al/archive/2007/11/10/3306.aspx</guid><wfw:comment>http://blogs.x2line.com/al/comments/3306.aspx</wfw:comment><comments>http://blogs.x2line.com/al/archive/2007/11/10/3306.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.x2line.com/al/comments/commentRss/3306.aspx</wfw:commentRss><trackback:ping>http://blogs.x2line.com/al/services/trackbacks/3306.aspx</trackback:ping><description>&lt;p&gt;Facebook introduced "Facebook Pages" 3 days ago. This feature enables business owners, artists, entrepreneurs, etc. to create a profile for their entity which looks similar to Facebook user profile. It reminds Myspace profiles for musicians and such.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Anyway, here is &lt;a href="http://www.facebook.com/pages/x2linecom/13924580213"&gt;x2line Facebook page&lt;/a&gt;. Feel free to add it (become a fan).&lt;/p&gt;&lt;img src ="http://blogs.x2line.com/al/aggbug/3306.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Anatoly Lubarsky</dc:creator><title>Facebook Black Wednesday (10/11/2007)</title><link>http://blogs.x2line.com/al/archive/2007/10/13/3291.aspx</link><pubDate>Sat, 13 Oct 2007 06:15:00 GMT</pubDate><guid>http://blogs.x2line.com/al/archive/2007/10/13/3291.aspx</guid><wfw:comment>http://blogs.x2line.com/al/comments/3291.aspx</wfw:comment><comments>http://blogs.x2line.com/al/archive/2007/10/13/3291.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.x2line.com/al/comments/commentRss/3291.aspx</wfw:commentRss><trackback:ping>http://blogs.x2line.com/al/services/trackbacks/3291.aspx</trackback:ping><description>&lt;p&gt;It was one of "those" pushes performed by Facebook last night. Facebook push is a weekly update usually performed by Facebook updating their production servers with new code, fixes and features. Apparently Facebook does not perform integration tests, therefore each push can break applications depending on the platform. Because of the fact that each push is performed too frequently without enough testing the platform became unstable. I already mentioned this earlier here - &lt;a href="http://blogs.x2line.com/al/archive/2007/09/21/3280.aspx" title="Facebook platform on Decline"&gt;Facebook platform on Decline&lt;/a&gt;.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;So what happened yesterday ? It started when Facebook moved the push one day later:&lt;/p&gt;&lt;br&gt;
&lt;p&gt;&lt;i&gt;"For this week only, we're moving the push to wednesday night, so hopefully you guys can breathe easy tonight."&lt;/i&gt;&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Many application development folks didn't pay much attention for the last words, since everything was stable for the past 3 weeks or so. Man WTF a shit load of bugs. It took them almost entire day to fix all breaking points in various places. One example - all desktop applications were broken - users were not able to login. Also application directory desktop applications section was emptied entirely including applications developed by Facebook itself were cleared. There were much more issues. Much more than acceptable level of bugs.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Personally I have tolerance for application/platform bugs and issues. There is no application in the world 100% bug free. But there is also some acceptable threshold level of bugs and their severity.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Meanwhile some popular applications redirected their users to Facebook beta tier in order not to loose them because eventually the end user does not know the truth and usually thinks that the application is broken or crappy. Which resulted in the following announcement by Facebook folks the other day:&lt;/p&gt;&lt;br&gt;
&lt;p&gt;&lt;i&gt;"Some apps instructed their users to go to the apps.beta.facebook.com/appname today instead of apps.facebook.com/appname.&lt;br&gt;&lt;br&gt;Our beta tier is only 3 machines and is just for testing. It can't handle the load from popular apps.&lt;br&gt;&lt;br&gt;If your app is crushing our beta tier by sending your users there, we'll have to disable your application. *. beta.facebook.com is just for testing and isn't set up to handle production load."&lt;/i&gt;&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Despite all this I think that Facebook platform architectural design is great and of very high level.&lt;/p&gt;&lt;img src ="http://blogs.x2line.com/al/aggbug/3291.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Anatoly Lubarsky</dc:creator><title>FQL Tricks: How to Count Records</title><link>http://blogs.x2line.com/al/archive/2007/10/07/3287.aspx</link><pubDate>Sun, 07 Oct 2007 03:42:00 GMT</pubDate><guid>http://blogs.x2line.com/al/archive/2007/10/07/3287.aspx</guid><wfw:comment>http://blogs.x2line.com/al/comments/3287.aspx</wfw:comment><comments>http://blogs.x2line.com/al/archive/2007/10/07/3287.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://blogs.x2line.com/al/comments/commentRss/3287.aspx</wfw:commentRss><trackback:ping>http://blogs.x2line.com/al/services/trackbacks/3287.aspx</trackback:ping><description>&lt;h4&gt;What is FQL ?&lt;/h4&gt;
&lt;p&gt;&lt;a href="http://developers.facebook.com/documentation.php?v=1.0&amp;amp;doc=fql" target="_blank"&gt;FQL&lt;/a&gt; is a Facebook platform SQL-style interface which can be queried by 3rd party applications using SQL-like syntax.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Some key features:&lt;/p&gt;&lt;br&gt;
&lt;ul&gt;
&lt;li&gt;FQL does not support joins, but supports sub-queries (including IN keyword).&lt;/li&gt;
&lt;li&gt;Query must be indexable (WHERE clause should include at least one field that is defined as "indexable").&lt;/li&gt;
&lt;li&gt;COUNT and ORDER BY are not supported.&lt;/li&gt;
&lt;li&gt;It is possible to select structured fields (e.g. SELECT current_location.zip) or entire structures.&lt;/li&gt;
&lt;li&gt;The output is XML.&lt;/li&gt;
&lt;/ul&gt;&lt;br&gt;
&lt;h4&gt;How to count records&lt;/h4&gt;
&lt;p&gt;Given that output XML is transferred over the wire one should also take care of the bandwidth. For example we want to get COUNT (only) of all current user friends who installed the current application. COUNT is not supported so we need to fetch all required records and count them on the application side. The query should go like so:&lt;/p&gt;&lt;br&gt;
&lt;pre&gt;SELECT '' 
  FROM user 
 WHERE uid IN (SELECT uid2 
                 FROM friend 
                WHERE uid1 = USERID)
   AND has_added_app = 1
&lt;/pre&gt;&lt;br&gt;
&lt;p&gt;Selecting empty string would reduce the size of the XML dramatically, yet it is very easy to count rows quickly.&lt;/p&gt;&lt;br&gt;
&lt;p&gt;Enjoy&lt;/p&gt;&lt;img src ="http://blogs.x2line.com/al/aggbug/3287.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>