Alex Rivera | Logout

Like button in iOS app with Facebook Single-Sign-On

Asked 2011-03-17T14:55:30.813
9

Is there any way to use the FB Single-Sign-On sign in flow in combination with the like button in a UIWebView?

I have an app that uses a UIWebView to display a webpage and with in that page there is a FB like button. I've gotten the like button to work as proposed in the post

Like button in iOS application

But the sign-in dialog doesnt look that nice and it would just be awesome if I could use the SSO flow instead. But I haven't gotten this to work yet. Any body who has tried this out?

Edit
Report

2 Answers

2

I actually modify the Facebook source to alway use safari for auth instead of the single sign on. This allows me to create my like buttons (or Like Boxes) inside the UIWebViews.

answered 2011-04-29T04:04:05.620
0

You can intercept the action from your like button.

Just set your like button with a link to http://mydomain.com/doLikeStuff

in the UIWebView, check in webView:shouldStartLoadWithRequest:navigationType:

for the /doLikeStuff link, return NO (so the web view doesn't actually do anything) and implement your custom flow.

answered 2011-08-11T13:24:37.180

Your Answer