Added support for prepared application requests and Friends API

Updated ruby to 2.1.2. Merge this after patch for app requests will be done.