How to perform X-FACEBOOK-PLATFORM and Google Talk X-OAUTH2 XMPP authentication with PHP Jaxl library

Posted 21 CommentsPosted in Open Source, PHP, XMPP
Ever since Jaxl library first introduced support for X-FACEBOOK-PLATFORM XMPP authentication mechanism, it has changed significantly. Also, Google Talk now supports OAuth 2.0 Authorization, an XMPP extension to allow users to log in using OAuth 2.0 credentials. Both these mechanisms are a big win for XMPP developers, since real-time conversation experience can now be provided to their application users without asking them for their passwords. In this blog post, I will demonstrate how to perform X-FACEBOOK-PLATFORM and X-OAUTH2 XMPP authentication mechanism using Jaxl v3.x PHP Library. X-FACEBOOK-PLATFORM XMPP Authentication Here is a quick guide on how to perform X-FACEBOOK-PLATFORM XMPP...

Facebook chat connect with X-FACEBOOK-PLATFORM using Jaxl 2.0

Posted 121 CommentsPosted in XMPP
Facebook chat provides two authentication mechanisms for authenticating chat client users. DIGEST-MD5 require chat client users to enter their username and password, while X-FACEBOOK-PLATFORM can be used to provide better user experience by using simple Facebook Platform authentication. In this blog post, I will demonstrate how to use Jaxl library for X-FACEBOOK-PLATFORM authentication. Echobot using X-FACEBOOK-PLATFORM Setup Jaxl library on your system and edit packaged sample echobot application with facebook user account details. Alternately you can also specify connecting user details inside jaxl.ini configuration file. $jaxl = new JAXL(array( 'user'=>'fbUsername', 'pass'=>'', // Not required, we will use user session key...

Write first facebook chat bot in PHP using Jaxl library

Posted 60 CommentsPosted in XMPP
Today facebook officially announced availability of it's chat through jabber/xmpp clients. This is a big win for XMPP, with almost 400 million new probable users adding into XMPP club. In this post, I will demonstrate how to connect to facebook chat servers using Jaxl client library in PHP. It can further be used to make custom chat bots for facebook. Creating your first facebook chat bot: Follow the steps to successfully run a facebook chat bot: Download Jaxl or checkout latest from trunk svn checkout http://jaxl.googlecode.com/svn/trunk/ jaxl-read-only Edit the configuration file config.ini.php as follows: // Set an enviornment $env =...

Facebook type image rotation and more using PHP and Javascript

Posted 30 CommentsPosted in PHP
If you are a facebook geek like me, you must have noticed till now the image rotate functionality in the photo albums. Facebook allows you to rotate images 90 degree clockwise and anti-clockwise after image upload. If you haven't tried that till now, below is a screenshot for your convenience. Question: But the question is how does facebook team succeed doing this in one click. Today I tried looking around for a solution over internet and I came across the inbuilt imagerotate functionality in PHP. Problem: Unfortunately the problem is that even if you have GD Library extension enabled in...

Konami Code on Facebook : How to implement it on your site

Posted 14 CommentsPosted in Web Development
Yesterday while chatting with friends, I discovered an unusual thing on facebook. Unusual because I didn't see any sense in what I saw back then. The process to discover this unusual thing is as follows: How to view lens flare on facebook 1. Login to facebook.com 2. Click once anywhere on your home page 3. Click the following sequence of characters using your keyboard 4. Up, Up, Down, Down, Left, Right, Left, Right, B, A, Enter Key 5. Click again on the page or try to scroll the page up or down If everything is done correctly you will see...

Memcached and “N” things you can do with it – Part 1

Posted 19 CommentsPosted in PHP, Scalability
In my last post, MySQL Query Cache, WP-Cache, APC, Memcache - What to choose, I discussed in brief about 4 caching technologies which you might have used knowingly or unknowingly. Towards the end, we came to the conclusion that Memcached is the best caching solution when you are looking for speed and number of hits per second. By my experience, Memcached is capable of handling more than 100 Million PV's per month without any problem. However, towards the end, I did also discuss why memcached is unreliable and insecure. In this post, I will dig a level deeper into memcached....

Link to new facebook design: See it building everyday

Posted 4 CommentsPosted in Tech Giants
Hello Everyone, I don't exactly remember from where I came across this link. The link shows you the latest development on new look and feel of facebook. Click the link below which will take you to the new facebook's development page. New Facebook Design Development Link What's new in the new design? Well Facebook was always Ajax dominated social networking site, but now it goes a step further. It adapts philosophy from iGoogle and my.Yahoo and provides its users to add new tabs at the top of your profile page. By DEFAULT it comes with Wall, Info, Photos and Boxes...