philippec / PhFacebook

MacOSX Interface to Facebook graph API
http://developer.casgrain.com/?p=107
Other
178 stars 44 forks source link

Support custom authentication UI #23

Closed k7d closed 13 years ago

k7d commented 13 years ago

The default auth UI in a dedicated window is a nice shortcut, however sometimes it might be desirable to integrated WebView into another window.

This patch adds a new optional method to PhFacebookDelegate:

If this method is implemented and returns true, PhFacebook will not display authentication window, instead it will rely on delegate to display appropriate URLs to user and perform necessary callbacks similarly to PhWebViewController.

As a bonus also added invalidateCachedToken which removes cached tokens from user defaults.

k7d commented 13 years ago

Yeah, there are so many different formatting styles for Objective-C that it's easy to slip...

Anyways, check the new commit 455ba44c1ea33aa2eb63, this should be better. You can discard the original commit as this one is on different branch.

k7d commented 13 years ago

Sorry didn't mean to close it... probably it's too early in the morning and coffee hasn't kicked in yet :)

philippec commented 13 years ago

Thanks! I have pulled your latest patch. I took the liberty of rewording the comments, and I also named the parameter "authenticationURL" to make it clearer than "authURL" since it is now a public header. So you will want to rebase your sources.

Cheers!