No, this is not a real Sinatra error :).
This is the personal homepage of Elad Meidar, a web developer and an entrepreneur specializing in Ruby on Rails. I hang around in Israel, and i am currently having the best time of my life over at Fiverr.com
I am a proud member of RailsBridge, Helping new Rails developers get into our world and also contributed a few Patches to the Ruby on Rails core.
For my next project i have to use Facebooker, which is currently the most stable Ruby gem that wraps the Facebook API.
Sadly it’s very badly documented and for the past 2 projects i’ve been using it, i remember exactly why i don’t really like this library.
So why do i use it and don’t write our own implementation? we’ll we do. but it will take some time since the Facebook API’s own documentation is a world of pain and we are not going to make the same mistake again and make a library with poor documentation.
So for the meanwhile, i’ll just post some useful tips we find along the way and might help others getting things to work:
Yeah, i posted how to handle Facebook’s stupid Session Expiry in a safe manner before, thought it worth mentioning again.
Oh this was hell, there was absolutely no documentation about how to mock a facebook user and API interaction if you use Cucumber. I did find this tutorial which, just doesn’t work.
So for example if we use this scenario:
And this is how the step goes:
Note the usage of
User#facebook_user, which basically returns a
Cucumber runs on it’s own environment, default named
Cucumber, so when you get something like that trying to run your features:
All you need to do is just to add another environment named
You're seeing this error because I think it is funny.