Skip to content

Commit

Permalink
change uiserver access to https and add .gitignore file
Browse files Browse the repository at this point in the history
  • Loading branch information
Yujuan Bao committed Sep 20, 2010
1 parent fcd2400 commit fce25d8
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .gitignore
@@ -0,0 +1,13 @@
sample/DemoApp/build/
sample/DemoApp/DemoApp.xcodeproj/*.pbxuser
sample/DemoApp/DemoApp.xcodeproj/*.mode*
sample/theRunAround/build/
sample/theRunAround/theRunAround.xcodeproj/*.pbxuser
sample/theRunAround/theRunAround.xcodeproj/*.mode*
src/facebook-ios-sdk.xcodeproj/*.pbxuser
src/facebook-ios-sdk.xcodeproj/*.mode*
src/build/
test/UnitTest/UnitTest.xcodeproj/*.pbxuser
test/UnitTest/UnitTest.xcodeproj/*.mode*
test/UnitTest/build/

3 changes: 2 additions & 1 deletion src/FBRequest.m
Expand Up @@ -45,7 +45,7 @@ + (FBRequest *)getRequestWithParams:(NSMutableDictionary *) params
delegate:(id<FBRequestDelegate>) delegate
requestURL:(NSString *) url {
FBRequest* request = [[[FBRequest alloc] init] autorelease];
request.delegate = delegate;
request.delegate = [delegate retain];
request.url = [url retain];
request.httpMethod = [httpMethod retain];
request.params = [params retain];
Expand Down Expand Up @@ -299,6 +299,7 @@ - (void)connect {
- (void)dealloc {
[_connection cancel];
[_connection release];
[_delegate release];
[_responseText release];
[_url release];
[_httpMethod release];
Expand Down
14 changes: 10 additions & 4 deletions src/Facebook.m
Expand Up @@ -22,7 +22,9 @@
static NSString* kRedirectURL = @"fbconnect://success";
static NSString* kGraphBaseURL = @"https://graph.facebook.com/";
static NSString* kRestApiURL = @"https://api.facebook.com/method/";
static NSString* kUIserverBaseURL = @"http://www.facebook.com/connect/uiserver.php";
static NSString* kUIServerBaseURL = @"http://www.facebook.com/connect/uiserver.php";
// Use this url when you pass access token to the server
static NSString* kUIServerSecureURL = @"https://www.facebook.com/connect/uiserver.php";
static NSString* kCancelURL = @"fbconnect://cancel";
static NSString* kLogin = @"login";
static NSString* kSDKVersion = @"ios";
Expand Down Expand Up @@ -351,7 +353,7 @@ - (void) dialog:(NSString *)action
andParams:(NSMutableDictionary *)params
andDelegate:(id <FBDialogDelegate>)delegate {


NSString *dialogURL = nil;
[params setObject:@"touch" forKey:@"display"];
[params setObject: kSDKVersion forKey:@"sdk"];

Expand All @@ -371,15 +373,19 @@ - (void) dialog:(NSString *)action
[params setValue:
[self.accessToken stringByReplacingPercentEscapesUsingEncoding:NSUTF8StringEncoding]
forKey:@"access_token"];
dialogURL = [kUIServerSecureURL copy];
} else {
dialogURL = [kUIServerBaseURL copy];
}

[_fbDialog release];
_fbDialog = [[FBDialog alloc] initWithURL:kUIserverBaseURL
_fbDialog = [[FBDialog alloc] initWithURL:dialogURL
params:params
delegate:delegate];
[dialogURL release];

}

[_fbDialog show];
}

Expand Down

0 comments on commit fce25d8

Please sign in to comment.