Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 10th, 2012  |  syntax: None  |  size: 1.27 KB  |  views: 2,948  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Facebook login fails in UIWebView
  2. https://www.facebook.com/plugins/close_popup.php?reload=https%3A%2F%2Fwww.facebook.com%2Fplugins%2Flogin_button.php%3Fapi_key%3D169204753146832%26channel%3Dhttp%253A%252F%252Fstatic.ak.facebook.com%252Fconnect%252Fxd_arbiter.php%253Fversion%253D9%2523cb%253Df1051eaed%2526origin%253Dhttp%25253A%25252F%25252Ftricities.dealsaver.com%25252Ffbc3dae68%2526domain%253Dtricities.dealsaver.com%2526relation%253Dparent.parent%26locale%3Den_US%26login_text%3DSign%2Bup%2Bwith%2BFacebook%26scope%3Dpublish_stream%252Cuser_likes%26sdk%3Djoey%26ret%3Dperms%26hash%3DAQCsCJlu9Nl34MTK&perms=user_likes&selected_profiles=789043653#_=_
  3.        
  4. <!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head><title>Facebook</title></head><body><script>document.domain = "facebook.com";if (!window.opener.closed) { window.opener.location.replace("https://www.facebook.com/plugins/login_button.php?api_key=194230417294529"); }window.close();</script></body></html>
  5.        
  6. /**
  7.  * Show the authorization dialog.
  8.  */
  9. - (void)login {
  10.     HackbookAppDelegate *delegate = (HackbookAppDelegate *)[[UIApplication sharedApplication] delegate];
  11.     if (![[delegate facebook] isSessionValid]) {
  12.         [[delegate facebook] authorize:permissions];
  13.     } else {
  14.         [self showLoggedIn];
  15.     }
  16. }
clone this paste RAW Paste Data