priore

Swizzeling Hack (FB example)

Jul 20th, 2012
807
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // http://www.cocoanetics.com/2012/04/disabling-facebook-sso-elegantly/
  2.  
  3. /*
  4. The experts are still out as to the motivations behind Facebook’s iOS SDK strategy. But it is rather clear that if Facebook has their way then everybody is to be using their Single Sign-On (SSO) technique. Besides all potential advantages of having this SSO in place it has to leave your app for signing on.
  5.  
  6. Not exactly something that is useful for all use cases. We have one case (involving ShareKit) which works better with the old style of signing into Facebook. This “traditional approach” shows the login dialog in a web pop up instead of leaving the app.
  7.  
  8. In this post I’m sharing the 3 methods how to hack the Facebook class and bend it to our will.
  9.  
  10.  
  11.  
  12. When researching for a way to disable SSO and restore the “old style” you inadvertently come across several people telling you to simply hack the authorize: method in Facebook.m.
  13. */
Add Comment
Please, Sign In to add comment