Support custom authentication UI #23

wants to merge 1 commit into

2 participants


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:
```- (BOOL) needAuth:(NSString*)authURL forPermissions:(NSString *)permissions;

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.

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 k7d closed this Jul 14, 2011
@k7d k7d reopened this Jul 14, 2011

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

@philippec philippec added a commit that referenced this pull request Jul 16, 2011
Kaspars Dancis #23: new delegate method needAuthentication to allow custom auth UI +…
… invalidateCachedToken method (fixed formating & stuff)

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.


@philippec philippec closed this Jul 16, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment