0

I am building an app that utilizes the FaceBook login via the faceBook SDK in the first view and I want to pass the auth info to the next view, which contain a UIWebView. I need to use the authentification from FaceBook within the UIWebView. Is this possible and how would I do such?

Thanks in advance!

DataGuy
  • 1,695
  • 4
  • 22
  • 38

1 Answers1

1

You can use:

[_webView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"YourFunction(%@);", variable]];

where YourFunction is a javascript function. Similar question: How to pass an XCode variable to the HTML file in resources folder?

Community
  • 1
  • 1
Giuseppe Mosca
  • 1,323
  • 12
  • 18
  • Thanks for your answer. The UIWebView in my app is an actual remote site that requires the login info from the Facebook SDK. How would this work with the solution you have proposed? I do have access to the remote site files. – DataGuy Nov 06 '12 at 19:30