Skip to content

Commit

Permalink
+ Most recent version of FBConnect
Browse files Browse the repository at this point in the history
+ New fields used by the app delegate for SHKFacebook
+ ShareKitAppDelegate now propagating appropriate incoming URLs
+ Replaced SHKFacebookKey and SHKFacebookSecret with SHKFacebookAppID
+ New version of SHKFacebook based on most recently released FBConnect library
+ Updated project file
  • Loading branch information
dagerydoo committed May 25, 2011
1 parent 9139332 commit 8bff3fa
Show file tree
Hide file tree
Showing 52 changed files with 3,266 additions and 2,480 deletions.
30 changes: 30 additions & 0 deletions Classes/Example/ShareKitAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#import "ShareKitAppDelegate.h"
#import "RootViewController.h"

#import "SHKFacebook.h"
#import "SHKReadItLater.h"
#import "SHKFacebook.h"

Expand Down Expand Up @@ -45,6 +46,35 @@ - (void)applicationWillTerminate:(UIApplication *)application
// Save data if appropriate
}

- (BOOL)handleOpenURL:(NSURL*)url
{
NSDictionary *info = [[NSBundle mainBundle] infoDictionary];
NSNumber *index = [info objectForKey:@"FacebookURLTypeIndex"];
if (! index) return YES;

NSArray *urlTypes = [info objectForKey:@"CFBundleURLTypes"];
if ((! urlTypes) || ([urlTypes count] <= [index integerValue])) return YES;

NSDictionary *facebookURL = [urlTypes objectAtIndex:[index integerValue]];
NSString *scheme = [[facebookURL objectForKey:@"CFBundleURLSchemes"] lastObject];
if ([[url scheme] isEqualToString:scheme])
return [SHKFacebook handleOpenURL:url];
return YES;
}

- (BOOL)application:(UIApplication *)application
openURL:(NSURL *)url
sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation
{
return [self handleOpenURL:url];
}

- (BOOL)application:(UIApplication *)application
handleOpenURL:(NSURL *)url
{
return [self handleOpenURL:url];
}

#pragma mark -
#pragma mark Memory management
Expand Down
3 changes: 1 addition & 2 deletions Classes/ShareKit/SHKConfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
// If SHKFacebookUseSessionProxy is enabled then SHKFacebookSecret is ignored and should be left blank

#define SHKFacebookUseSessionProxy NO
#define SHKFacebookKey @""
#define SHKFacebookSecret @""
#define SHKFacebookAppID @""
#define SHKFacebookSessionProxyURL @""

// Read It Later - http://readitlaterlist.com/api/?shk
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
18 changes: 9 additions & 9 deletions Classes/ShareKit/Sharers/Services/Facebook/FBConnect/FBConnect.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
/*
* Copyright 2009 Facebook
* Copyright 2010 Facebook
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
*/


#import "FBSession.h"
#import "FBRequest.h"
#import "FBLoginButton.h"
#import "FBLoginDialog.h"
#import "FBPermissionDialog.h"
#import "FBStreamDialog.h"
#include "Facebook.h"
#include "FBDialog.h"
#include "FBLoginDialog.h"
#include "FBRequest.h"
#include "SBJSON.h"
218 changes: 0 additions & 218 deletions Classes/ShareKit/Sharers/Services/Facebook/FBConnect/FBConnectGlobal.h

This file was deleted.

This file was deleted.

Loading

0 comments on commit 8bff3fa

Please sign in to comment.