I am working on app that contains facebook login .After login with face book I need to go to native application & app should display user name & image that was there in
I had the same issue with my ios app and this is what i have done to resolve my problem. i have found the below url in my app and changed the connection from http to https.
earlier url: http://www.facebook.com/connect/login_success.html
changed url: https://www.facebook.com/connect/login_success.html
now it's working fine.
Solved per Zack24 on Apr 24.
Here is my webView loadRequest URL. Note the https for the redirect_uri.
https://graph.facebook.com/oauth/authorize?client_id=147261088671924&redirect_uri=https://www.facebook.com/connect/login_success.html&display=touch&type=user_agent&scope=read_stream,publish_stream
Apart from implementing :
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation`
you have to add URL Types > URL Schemes
into your application plist, with value : fb1234567890
where 1234567890
is your App ID.
See Item 5: https://developers.facebook.com/docs/getting-started/facebook-sdk-for-ios/
I found one solution. I hope it will work for you.
Just paste this UIWebViewDelegate method in your FbGraph.m file....
- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType{
if([request.URL.relativeString hasPrefix:@"https://www.facebook.com/connect/login_success.html" ])
self.webView.hidden=TRUE;
return YES;
}