Jun 21

Currently I am developing an application with C# which uses the Facebook API. I will keep posting about this but now I’d like to write about an error that I came across and post the solution.

If you are familiar with the Facebook API you know how it works. You can write an application which uses any features of the facebook API but when you are actually requesting data a built-in login window appears which asks for your login details to Facebook. If you provide the correct username and password the data you requested from your application is being displayed (or rather you can use the requested data as you wish).
It was between the login and the data display when my application gave me the error message “requested value ‘UnitedKingdom’ was not found” and it crashed. To resolve this error, this is what you should do:

Open the original Facebook API project (if you downloaded it from Microsoft’s website, the default installation directory is C:\Program Files\Coding4Fun\Facebook\Source). Look for the file “location.cs” which contains an enum list of all countries, states (US) and so on.

Facebook API - Location.cs

Simply open that file for editing and search for the enum called public enum Country. Add the value UnitedKingdom to this list, recompile the project and you are done. Don’t forget to add the newly created dlls as references to your project.

Feb 11

I always had this problem with my Firefox web-browser. Whenever I was running it for a long time, it suddenly hung and the only solution that brought it back to life was a pure and solid click on the “end process” button. Some weeks ago I really had enough of it and I thought I would run a search on this, hoping to find a solution. And luckily I did. This website explains how to fix the Firefox memory leak. Let me summarise the article:

  • Type about:config into your address bar in Firefox.
  • Create a new integer value (right click, new > integer). Name it as browser.cache.memory.capacity and give a low number for its value (Save it afterwards)
  • Search for the value browser.cache.disk.capacity and set its value to 15000 if you are using 1G of RAM.
  • Search for network.prefetch-next and set its value to false.

I think this should solve the memory leak, however on the website I have just recommended you can read about some more solutions as well. Happy hacking Firefox :)