views:

1054

answers:

1

UiWebView redirect its self to already login page.i want to stop redirect? I want web view to reload login page and ask for username and password.Clear context and load request again.

    NSString *urlAddress = [NSString stringWithFormat:@"http://www.facebook.com/login.php?];

 //Create a URL object.

 NSURL *urld = [NSURL URLWithString:urlAddress];

 //URL Requst Object
 NSURLRequest *requestObj = [NSURLRequest requestWithURL:urld];

 //Load the request in the UIWebView.

 [webView loadRequest:requestObj];

               [webView reload];
+3  A: 

If you are wanting to integrate with Facebook, I suggest using the Facebook Connect for iPhone.

http://wiki.developers.facebook.com/index.php/Facebook_Connect_for_iPhone

Daniel A. White