Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 844
Wrags Avatar asked Mar 17 '11 14:03

Wrags


2 Answers

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.

like image 58
Joey Schluchter Avatar answered Nov 15 '22 20:11

Joey Schluchter


Facebook API actually first checks if your ios device supports multitasking. If not it is using the pop up dialog. If the device does support, then it trying to use Facebook app (if it is installed on the device of course), then safari and only then fallbacks to pop up dialog. Pay attention to use the same Facebook object, otherwise you'll need to login for every action...

like image 21
Ariel Avatar answered Nov 15 '22 20:11

Ariel