Monthly Archives: September 2010

code misc rails

FacebookError: OAuthException – Invalid OAuth access token

On, we got notified of some issues with Facebook signups and logins. All of the sudden, when the Facebook OAuth service pushed us back to our redirect-page, the HyperGraph Gem threw the following error:

FacebookError: OAuthException – Invalid OAuth access token

This is often thrown because the Access Token could contain a | (pipe) character, which gets encoded to %7C, and this makes HyperGraph choke a bit. So a simple gsub(‘%7C’,’|’) will solve it, such as the code below:

at = HyperGraph.get_access_token(FB_ID, FB_SECRET, FB_RET, code)
at = at.gsub(‘%7C’,’|’)
g =
me = g.get(‘me’)


misc sysadmin

Error mongoDB under Ubuntu – can’t find

When installing MongoDB under Ubuntu, one could stumble upon the following problem:

mongo: error while loading shared libraries: cannot open shared object file: No such file or directory

This is caused because MongoDB uses XulRunner for it’s operations. (This is also why you see a bunch of X11 programs that are to be installed when using apt-get). XulRunner, however, contains this file, but is not loaded.

Solving the problem:
Make sure you have xulrunner installed (sudo apt-get install xulrunner-1.9.2) and add its path to ldconfig’s configuration files, which are in/etc/ You could create a file, say, /etc/, containing the following line:


After this, you chould run ldconfig (as root) and that should do the trick. Let me know if you have any problems with this.


TRA to developed e-commerce “policy”

The Telecommunications Regulatory Authority (TRA) wishes to boost the online commerce in the UAE by implementing new policies, said the National.

“The TRA’s aim is to increase and boost the online transactions and the population who are using online commerce,” Ms al Jaberi said at The Internet Show in Abu Dhabi yesterday.

(The National)

Seeing this is the same department that is willing to suspend Blackberry services due to its encrypted nature; Would this mean that solely UAE payment gateways are to be used? Paypal, be worried.