-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathHPAppDelegate.m
53 lines (39 loc) · 1.73 KB
/
HPAppDelegate.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//
// HPAppDelegate.m
// HPSocialNetworkManager
//
// Created by Sarp Erdag on 12/3/12.
// Copyright (c) 2012 Hipo. All rights reserved.
//
#import "HPAccountManager.h"
#import "HPAppDelegate.h"
#import "HPViewController.h"
static NSString * const HPFacebookAppID = @"261143290677780";
static NSString * const HPTwitterConsumerKey = @"53S2OYAd5r2wV1jbW5Dg";
static NSString * const HPTwitterConsumerSecret = @"pzxUp9Kh9nph0VnoJBzaZh7oo2scVl94xvqtaXagL0";
@implementation HPAppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[HPAccountManager sharedManager] setupWithFacebookAppID:HPFacebookAppID
facebookAppPermissions:@[@"email", @"user_location", @"user_about_me"]
facebookSchemeSuffix:@""
twitterConsumerKey:HPTwitterConsumerKey
twitterConsumerSecret:HPTwitterConsumerSecret];
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
self.viewController = [[[HPViewController alloc] initWithNibName:@"HPViewController" bundle:nil] autorelease];
self.window.rootViewController = self.viewController;
[self.window makeKeyAndVisible];
return YES;
}
- (void)dealloc {
[_window release], _window = nil;
[_viewController release], _viewController = nil;
[super dealloc];
}
#pragma mark - URL handling
- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation {
return [[HPAccountManager sharedManager] handleOpenURL:url];
}
@end