├── .DS_Store └── Facebook Demo ├── .DS_Store ├── Classes ├── FBFeedPost.h ├── FBFeedPost.m ├── FBRequestWrapper.h ├── FBRequestWrapper.m ├── Facebook_DemoAppDelegate.h ├── Facebook_DemoAppDelegate.m ├── RootViewController.h └── RootViewController.m ├── External Frameworks ├── .DS_Store ├── Facebook SDK │ ├── .svn │ │ ├── all-wcprops │ │ ├── entries │ │ ├── prop-base │ │ │ ├── FBConnect.h.svn-base │ │ │ ├── FBDialog.h.svn-base │ │ │ ├── FBDialog.m.svn-base │ │ │ ├── FBLoginDialog.h.svn-base │ │ │ ├── FBLoginDialog.m.svn-base │ │ │ ├── FBRequest.h.svn-base │ │ │ ├── FBRequest.m.svn-base │ │ │ ├── Facebook.h.svn-base │ │ │ └── Facebook.m.svn-base │ │ └── text-base │ │ │ ├── FBConnect.h.svn-base │ │ │ ├── FBDialog.h.svn-base │ │ │ ├── FBDialog.m.svn-base │ │ │ ├── FBImageView.h.svn-base │ │ │ ├── FBImageView.m.svn-base │ │ │ ├── FBLoginDialog.h.svn-base │ │ │ ├── FBLoginDialog.m.svn-base │ │ │ ├── FBRequest.h.svn-base │ │ │ ├── FBRequest.m.svn-base │ │ │ ├── Facebook.h.svn-base │ │ │ ├── Facebook.m.svn-base │ │ │ ├── NSString+HTML.h.svn-base │ │ │ └── NSString+HTML.m.svn-base │ ├── FBConnect.h │ ├── FBDialog.bundle │ │ ├── .svn │ │ │ ├── all-wcprops │ │ │ └── entries │ │ └── images │ │ │ ├── .svn │ │ │ ├── all-wcprops │ │ │ ├── entries │ │ │ ├── prop-base │ │ │ │ ├── close.png.svn-base │ │ │ │ └── fbicon.png.svn-base │ │ │ └── text-base │ │ │ │ ├── close.png.svn-base │ │ │ │ └── fbicon.png.svn-base │ │ │ ├── close.png │ │ │ └── fbicon.png │ ├── FBDialog.h │ ├── FBDialog.m │ ├── FBImageView.h │ ├── FBImageView.m │ ├── FBLoginDialog.h │ ├── FBLoginDialog.m │ ├── FBRequest.h │ ├── FBRequest.m │ ├── Facebook.h │ ├── Facebook.m │ ├── NSString+HTML.h │ └── NSString+HTML.m └── JSON │ ├── .svn │ ├── all-wcprops │ ├── entries │ ├── prop-base │ │ ├── JSON.h.svn-base │ │ ├── NSObject+SBJSON.h.svn-base │ │ ├── NSObject+SBJSON.m.svn-base │ │ ├── NSString+SBJSON.h.svn-base │ │ ├── NSString+SBJSON.m.svn-base │ │ ├── SBJSON.h.svn-base │ │ ├── SBJSON.m.svn-base │ │ ├── SBJsonBase.h.svn-base │ │ ├── SBJsonBase.m.svn-base │ │ ├── SBJsonParser.h.svn-base │ │ ├── SBJsonParser.m.svn-base │ │ ├── SBJsonWriter.h.svn-base │ │ └── SBJsonWriter.m.svn-base │ └── text-base │ │ ├── JSON.h.svn-base │ │ ├── NSObject+SBJSON.h.svn-base │ │ ├── NSObject+SBJSON.m.svn-base │ │ ├── NSString+SBJSON.h.svn-base │ │ ├── NSString+SBJSON.m.svn-base │ │ ├── SBJSON.h.svn-base │ │ ├── SBJSON.m.svn-base │ │ ├── SBJsonBase.h.svn-base │ │ ├── SBJsonBase.m.svn-base │ │ ├── SBJsonParser.h.svn-base │ │ ├── SBJsonParser.m.svn-base │ │ ├── SBJsonWriter.h.svn-base │ │ └── SBJsonWriter.m.svn-base │ ├── JSON.h │ ├── NSObject+SBJSON.h │ ├── NSObject+SBJSON.m │ ├── NSString+SBJSON.h │ ├── NSString+SBJSON.m │ ├── SBJSON.h │ ├── SBJSON.m │ ├── SBJsonBase.h │ ├── SBJsonBase.m │ ├── SBJsonParser.h │ ├── SBJsonParser.m │ ├── SBJsonWriter.h │ └── SBJsonWriter.m ├── Facebook Demo.xcodeproj ├── ayanok.mode1v3 ├── ayanok.pbxuser └── project.pbxproj ├── Facebook_Demo-Info.plist ├── Facebook_Demo_Prefix.pch ├── IFNNotificationDisplay.h ├── IFNNotificationDisplay.m ├── MainWindow.xib ├── PostLinkViewController.h ├── PostLinkViewController.m ├── PostLinkViewController.xib ├── PostPhotoViewController.h ├── PostPhotoViewController.m ├── PostPhotoViewController.xib ├── RootViewController.xib ├── StatusViewController.h ├── StatusViewController.m ├── StatusViewController.xib ├── build ├── Debug-iphonesimulator │ ├── Facebook Demo.app.dSYM │ │ └── Contents │ │ │ ├── Info.plist │ │ │ └── Resources │ │ │ └── DWARF │ │ │ └── Facebook Demo │ └── Facebook Demo.app │ │ ├── FBDialog.bundle │ │ └── images │ │ │ ├── close.png │ │ │ └── fbicon.png │ │ ├── Facebook Demo │ │ ├── Info.plist │ │ ├── MainWindow.nib │ │ ├── PkgInfo │ │ ├── PostLinkViewController.nib │ │ ├── PostPhotoViewController.nib │ │ ├── RootViewController.nib │ │ ├── ScreenShotViewController.nib │ │ ├── StatusViewController.nib │ │ └── icodeblog-icon.png └── Facebook Demo.build │ ├── Debug-iphonesimulator │ └── Facebook Demo.build │ │ ├── Facebook Demo-all-target-headers.hmap │ │ ├── Facebook Demo-generated-files.hmap │ │ ├── Facebook Demo-own-target-headers.hmap │ │ ├── Facebook Demo-project-headers.hmap │ │ ├── Facebook Demo.dep │ │ ├── Facebook Demo.hmap │ │ ├── Facebook Demo~.dep │ │ ├── Objects-normal │ │ └── i386 │ │ │ ├── FBDialog.o │ │ │ ├── FBFeedPost.o │ │ │ ├── FBImageView.o │ │ │ ├── FBLoginDialog.o │ │ │ ├── FBRequest.o │ │ │ ├── FBRequestWrapper.o │ │ │ ├── Facebook Demo.LinkFileList │ │ │ ├── Facebook.o │ │ │ ├── Facebook_DemoAppDelegate.o │ │ │ ├── IFNNotificationDisplay.o │ │ │ ├── NSObject+SBJSON.o │ │ │ ├── NSString+HTML.o │ │ │ ├── NSString+SBJSON.o │ │ │ ├── PostLinkViewController.o │ │ │ ├── PostPhotoViewController.o │ │ │ ├── RootViewController.o │ │ │ ├── SBJSON.o │ │ │ ├── SBJsonBase.o │ │ │ ├── SBJsonParser.o │ │ │ ├── SBJsonWriter.o │ │ │ ├── StatusViewController.o │ │ │ └── main.o │ │ ├── build-state.dat │ │ └── build-state~.dat │ └── Facebook Demo.pbxindex │ ├── categories.pbxbtree │ ├── cdecls.pbxbtree │ ├── decls.pbxbtree │ ├── files.pbxbtree │ ├── imports.pbxbtree │ ├── pbxindex.header │ ├── protocols.pbxbtree │ ├── refs.pbxbtree │ ├── strings.pbxstrings │ ├── control │ └── strings │ ├── subclasses.pbxbtree │ └── symbols0.pbxsymbols ├── icodeblog-icon.png └── main.m /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/.DS_Store -------------------------------------------------------------------------------- /Facebook Demo/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/.DS_Store -------------------------------------------------------------------------------- /Facebook Demo/Classes/FBFeedPost.h: -------------------------------------------------------------------------------- 1 | // 2 | // FBFeedPost.h 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/1/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "FBRequestWrapper.h" 11 | 12 | @protocol FBFeedPostDelegate; 13 | 14 | typedef enum { 15 | FBPostTypeStatus = 0, 16 | FBPostTypePhoto = 1, 17 | FBPostTypeLink = 2 18 | } FBPostType; 19 | 20 | @interface FBFeedPost : NSObject 21 | { 22 | NSString *url; 23 | NSString *message; 24 | NSString *caption; 25 | UIImage *image; 26 | FBPostType postType; 27 | 28 | id delegate; 29 | } 30 | 31 | @property (nonatomic, assign) FBPostType postType; 32 | @property (nonatomic, retain) NSString *url; 33 | @property (nonatomic, retain) NSString *message; 34 | @property (nonatomic, retain) NSString *caption; 35 | @property (nonatomic, retain) UIImage *image; 36 | 37 | @property (nonatomic, assign) id delegate; 38 | 39 | - (id) initWithLinkPath:(NSString*) _url caption:(NSString*) _caption; 40 | - (id) initWithPostMessage:(NSString*) _message; 41 | - (id) initWithPhoto:(UIImage*) _image name:(NSString*) _name; 42 | - (void) publishPostWithDelegate:(id) _delegate; 43 | 44 | @end 45 | 46 | 47 | @protocol FBFeedPostDelegate 48 | @required 49 | - (void) failedToPublishPost:(FBFeedPost*) _post; 50 | - (void) finishedPublishingPost:(FBFeedPost*) _post; 51 | @end -------------------------------------------------------------------------------- /Facebook Demo/Classes/FBFeedPost.m: -------------------------------------------------------------------------------- 1 | // 2 | // FBFeedPost.m 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/1/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "FBFeedPost.h" 10 | 11 | 12 | @implementation FBFeedPost 13 | @synthesize message, caption, image, url, postType, delegate; 14 | 15 | - (id) initWithLinkPath:(NSString*) _url caption:(NSString*) _caption { 16 | self = [super init]; 17 | if (self) { 18 | postType = FBPostTypeLink; 19 | url = [_url retain]; 20 | caption = [_caption retain]; 21 | } 22 | return self; 23 | } 24 | 25 | - (id) initWithPostMessage:(NSString*) _message { 26 | self = [super init]; 27 | if (self) { 28 | postType = FBPostTypeStatus; 29 | message = [_message retain]; 30 | } 31 | return self; 32 | } 33 | 34 | - (id) initWithPhoto:(UIImage*) _image name:(NSString*) _name { 35 | self = [super init]; 36 | if (self) { 37 | postType = FBPostTypePhoto; 38 | image = [_image retain]; 39 | caption = [_image retain]; 40 | } 41 | return self; 42 | } 43 | 44 | - (void) publishPostWithDelegate:(id) _delegate { 45 | 46 | //store the delegate incase the user needs to login 47 | self.delegate = _delegate; 48 | 49 | // if the user is not currently logged in begin the session 50 | BOOL loggedIn = [[FBRequestWrapper defaultManager] isLoggedIn]; 51 | if (!loggedIn) { 52 | [[FBRequestWrapper defaultManager] FBSessionBegin:self]; 53 | } 54 | else { 55 | NSMutableDictionary *params = [[[NSMutableDictionary alloc] init] autorelease]; 56 | 57 | //Need to provide POST parameters to the Facebook SDK for the specific post type 58 | NSString *graphPath = @"me/feed"; 59 | 60 | switch (postType) { 61 | case FBPostTypeLink: 62 | { 63 | [params setObject:@"link" forKey:@"type"]; 64 | [params setObject:self.url forKey:@"link"]; 65 | [params setObject:self.caption forKey:@"description"]; 66 | break; 67 | } 68 | case FBPostTypeStatus: 69 | { 70 | [params setObject:@"status" forKey:@"type"]; 71 | [params setObject:self.message forKey:@"message"]; 72 | break; 73 | } 74 | case FBPostTypePhoto: 75 | { 76 | graphPath = @"me/photos"; 77 | [params setObject:self.image forKey:@"source"]; 78 | [params setObject:self.caption forKey:@"message"]; 79 | break; 80 | } 81 | default: 82 | break; 83 | } 84 | 85 | [[FBRequestWrapper defaultManager] sendFBRequestWithGraphPath:graphPath params:params andDelegate:self]; 86 | } 87 | } 88 | 89 | #pragma mark - 90 | #pragma mark FacebookSessionDelegate 91 | 92 | - (void)fbDidLogin { 93 | [[FBRequestWrapper defaultManager] setIsLoggedIn:YES]; 94 | 95 | //after the user is logged in try to publish the post 96 | [self publishPostWithDelegate:self.delegate]; 97 | } 98 | 99 | - (void)fbDidNotLogin:(BOOL)cancelled { 100 | [[FBRequestWrapper defaultManager] setIsLoggedIn:NO]; 101 | 102 | } 103 | 104 | #pragma mark - 105 | #pragma mark FBRequestDelegate 106 | 107 | - (void)request:(FBRequest *)request didFailWithError:(NSError *)error { 108 | [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; 109 | NSLog(@"ResponseFailed: %@", error); 110 | 111 | if ([self.delegate respondsToSelector:@selector(failedToPublishPost:)]) 112 | [self.delegate failedToPublishPost:self]; 113 | } 114 | 115 | - (void)request:(FBRequest *)request didLoad:(id)result { 116 | [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; 117 | NSLog(@"Parsed Response: %@", result); 118 | 119 | if ([self.delegate respondsToSelector:@selector(finishedPublishingPost:)]) 120 | [self.delegate finishedPublishingPost:self]; 121 | } 122 | 123 | 124 | - (void) dealloc { 125 | self.delegate = nil; 126 | [url release], url = nil; 127 | [message release], message = nil; 128 | [caption release], caption = nil; 129 | [image release], image = nil; 130 | [super dealloc]; 131 | } 132 | 133 | @end 134 | -------------------------------------------------------------------------------- /Facebook Demo/Classes/FBRequestWrapper.h: -------------------------------------------------------------------------------- 1 | // 2 | // FBRequestWrapper.h 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/6/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "Facebook.h" 11 | 12 | #define FB_APP_ID @"197366800287642" 13 | #define FB_API_KEY @"3269fff9ef3b6fc13255e670ebb44c4d" 14 | #define FB_APP_SECRET @"d038b12cc8632865952f69722fe26393" 15 | 16 | @interface FBRequestWrapper : NSObject 17 | { 18 | Facebook *facebook; 19 | BOOL isLoggedIn; 20 | } 21 | 22 | @property (nonatomic, assign) BOOL isLoggedIn; 23 | 24 | + (id) defaultManager; 25 | - (void) setIsLoggedIn:(BOOL) _loggedIn; 26 | - (void) FBSessionBegin:(id) _delegate; 27 | - (void) FBLogout; 28 | - (void) getFBRequestWithGraphPath:(NSString*) _path andDelegate:(id) _delegate; 29 | - (void) sendFBRequestWithGraphPath:(NSString*) _path params:(NSMutableDictionary*) _params andDelegate:(id) _delegate; 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /Facebook Demo/Classes/FBRequestWrapper.m: -------------------------------------------------------------------------------- 1 | // 2 | // FBRequestWrapper.m 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/6/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "FBRequestWrapper.h" 10 | 11 | static FBRequestWrapper *defaultWrapper = nil; 12 | 13 | @implementation FBRequestWrapper 14 | @synthesize isLoggedIn; 15 | 16 | + (id) defaultManager { 17 | 18 | if (!defaultWrapper) 19 | defaultWrapper = [[FBRequestWrapper alloc] init]; 20 | 21 | return defaultWrapper; 22 | } 23 | 24 | - (void) setIsLoggedIn:(BOOL) _loggedIn { 25 | isLoggedIn = _loggedIn; 26 | 27 | if (isLoggedIn) { 28 | [[NSUserDefaults standardUserDefaults] setObject:facebook.accessToken forKey:@"access_token"]; 29 | [[NSUserDefaults standardUserDefaults] setObject:facebook.expirationDate forKey:@"exp_date"]; 30 | [[NSUserDefaults standardUserDefaults] synchronize]; 31 | } 32 | else { 33 | [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"access_token"]; 34 | [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"exp_date"]; 35 | [[NSUserDefaults standardUserDefaults] synchronize]; 36 | } 37 | } 38 | 39 | - (void) FBSessionBegin:(id) _delegate { 40 | 41 | if (facebook == nil) { 42 | facebook = [[Facebook alloc] init]; 43 | 44 | NSString *token = [[NSUserDefaults standardUserDefaults] objectForKey:@"access_token"]; 45 | NSDate *exp = [[NSUserDefaults standardUserDefaults] objectForKey:@"exp_date"]; 46 | 47 | if (token != nil && exp != nil && [token length] > 2) { 48 | isLoggedIn = YES; 49 | facebook.accessToken = token; 50 | facebook.expirationDate = [NSDate distantFuture]; 51 | } 52 | 53 | 54 | [facebook retain]; 55 | } 56 | 57 | NSArray * permissions = [NSArray arrayWithObjects: 58 | @"publish_stream", 59 | nil]; 60 | 61 | //if no session is available login 62 | [facebook authorize:FB_APP_ID permissions:permissions delegate:_delegate]; 63 | } 64 | 65 | - (void) FBLogout { 66 | [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"access_token"]; 67 | [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"exp_date"]; 68 | [[NSUserDefaults standardUserDefaults] synchronize]; 69 | 70 | [facebook logout:self]; 71 | } 72 | 73 | // Make simple requests 74 | - (void) getFBRequestWithGraphPath:(NSString*) _path andDelegate:(id) _delegate { 75 | if (_path != nil) { 76 | [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; 77 | 78 | if (_delegate == nil) 79 | _delegate = self; 80 | 81 | [facebook requestWithGraphPath:_path andDelegate:_delegate]; 82 | } 83 | } 84 | 85 | // Used for publishing 86 | - (void) sendFBRequestWithGraphPath:(NSString*) _path params:(NSMutableDictionary*) _params andDelegate:(id) _delegate { 87 | 88 | if (_delegate == nil) 89 | _delegate = self; 90 | 91 | if (_params != nil && _path != nil) { 92 | 93 | [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:YES]; 94 | [facebook requestWithGraphPath:_path andParams:_params andHttpMethod:@"POST" andDelegate:_delegate]; 95 | } 96 | } 97 | 98 | #pragma mark - 99 | #pragma mark FacebookSessionDelegate 100 | 101 | - (void)fbDidLogin { 102 | isLoggedIn = YES; 103 | 104 | [[NSUserDefaults standardUserDefaults] setObject:facebook.accessToken forKey:@"access_token"]; 105 | [[NSUserDefaults standardUserDefaults] setObject:facebook.expirationDate forKey:@"exp_date"]; 106 | [[NSUserDefaults standardUserDefaults] synchronize]; 107 | } 108 | 109 | - (void)fbDidNotLogin:(BOOL)cancelled { 110 | isLoggedIn = NO; 111 | } 112 | 113 | - (void)fbDidLogout { 114 | [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"access_token"]; 115 | [[NSUserDefaults standardUserDefaults] setObject:@"" forKey:@"exp_date"]; 116 | [[NSUserDefaults standardUserDefaults] synchronize]; 117 | 118 | isLoggedIn = NO; 119 | } 120 | 121 | 122 | #pragma mark - 123 | #pragma mark FBRequestDelegate 124 | 125 | - (void)request:(FBRequest *)request didFailWithError:(NSError *)error { 126 | [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; 127 | //NSLog(@"ResponseFailed: %@", error); 128 | } 129 | 130 | - (void)request:(FBRequest *)request didLoad:(id)result { 131 | [[UIApplication sharedApplication] setNetworkActivityIndicatorVisible:NO]; 132 | //NSLog(@"Parsed Response: %@", result); 133 | } 134 | 135 | 136 | - (void) dealloc { 137 | [facebook release], facebook = nil; 138 | [super dealloc]; 139 | } 140 | 141 | @end 142 | -------------------------------------------------------------------------------- /Facebook Demo/Classes/Facebook_DemoAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // Facebook_DemoAppDelegate.h 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/1/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface Facebook_DemoAppDelegate : NSObject { 12 | 13 | UIWindow *window; 14 | UINavigationController *navigationController; 15 | } 16 | 17 | @property (nonatomic, retain) IBOutlet UIWindow *window; 18 | @property (nonatomic, retain) IBOutlet UINavigationController *navigationController; 19 | 20 | @end 21 | 22 | -------------------------------------------------------------------------------- /Facebook Demo/Classes/Facebook_DemoAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // Facebook_DemoAppDelegate.m 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/1/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "Facebook_DemoAppDelegate.h" 10 | #import "RootViewController.h" 11 | 12 | 13 | @implementation Facebook_DemoAppDelegate 14 | 15 | @synthesize window; 16 | @synthesize navigationController; 17 | 18 | 19 | #pragma mark - 20 | #pragma mark Application lifecycle 21 | 22 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 23 | 24 | // Override point for customization after application launch. 25 | 26 | // Add the navigation controller's view to the window and display. 27 | [self.window addSubview:navigationController.view]; 28 | [self.window makeKeyAndVisible]; 29 | 30 | return YES; 31 | } 32 | 33 | 34 | - (void)applicationWillResignActive:(UIApplication *)application { 35 | /* 36 | Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 37 | Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 38 | */ 39 | } 40 | 41 | 42 | - (void)applicationDidEnterBackground:(UIApplication *)application { 43 | /* 44 | Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 45 | If your application supports background execution, called instead of applicationWillTerminate: when the user quits. 46 | */ 47 | } 48 | 49 | 50 | - (void)applicationWillEnterForeground:(UIApplication *)application { 51 | /* 52 | Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. 53 | */ 54 | } 55 | 56 | 57 | - (void)applicationDidBecomeActive:(UIApplication *)application { 58 | /* 59 | Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 60 | */ 61 | } 62 | 63 | 64 | - (void)applicationWillTerminate:(UIApplication *)application { 65 | /* 66 | Called when the application is about to terminate. 67 | See also applicationDidEnterBackground:. 68 | */ 69 | } 70 | 71 | 72 | #pragma mark - 73 | #pragma mark Memory management 74 | 75 | - (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { 76 | /* 77 | Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. 78 | */ 79 | } 80 | 81 | 82 | - (void)dealloc { 83 | [navigationController release]; 84 | [window release]; 85 | [super dealloc]; 86 | } 87 | 88 | 89 | @end 90 | 91 | -------------------------------------------------------------------------------- /Facebook Demo/Classes/RootViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.h 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/1/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "StatusViewController.h" 11 | #import "PostLinkViewController.h" 12 | #import "PostPhotoViewController.h" 13 | 14 | @interface RootViewController : UITableViewController 15 | { 16 | NSArray *postList; 17 | } 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Facebook Demo/Classes/RootViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // RootViewController.m 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/1/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "RootViewController.h" 10 | 11 | 12 | @implementation RootViewController 13 | 14 | 15 | #pragma mark - 16 | #pragma mark View lifecycle 17 | 18 | 19 | - (void)viewDidLoad { 20 | [super viewDidLoad]; 21 | 22 | self.title = @"Facebook Demo"; 23 | 24 | postList = [NSArray arrayWithObjects:@"Status Post", @"Post A Link", @"Post A Photo", nil]; 25 | [postList retain]; 26 | } 27 | 28 | 29 | #pragma mark - 30 | #pragma mark Table view data source 31 | 32 | // Customize the number of sections in the table view. 33 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 34 | return 1; 35 | } 36 | 37 | 38 | // Customize the number of rows in the table view. 39 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 40 | return [postList count]; 41 | } 42 | 43 | 44 | // Customize the appearance of table view cells. 45 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 46 | 47 | static NSString *CellIdentifier = @"Cell"; 48 | 49 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; 50 | if (cell == nil) { 51 | cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; 52 | } 53 | 54 | cell.textLabel.text = [postList objectAtIndex:indexPath.row]; 55 | cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; 56 | 57 | return cell; 58 | } 59 | 60 | 61 | #pragma mark - 62 | #pragma mark Table view delegate 63 | 64 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 65 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 66 | 67 | switch (indexPath.row) { 68 | case 0: 69 | { 70 | StatusViewController *status = [[StatusViewController alloc] init]; 71 | [self.navigationController pushViewController:status animated:YES]; 72 | [status release]; 73 | break; 74 | } 75 | case 1: 76 | { 77 | PostLinkViewController *link = [[PostLinkViewController alloc] init]; 78 | [self.navigationController pushViewController:link animated:YES]; 79 | [link release]; 80 | break; 81 | } 82 | case 2: 83 | { 84 | PostPhotoViewController *photo = [[PostPhotoViewController alloc] init]; 85 | [self.navigationController pushViewController:photo animated:YES]; 86 | [photo release]; 87 | break; 88 | } 89 | default: 90 | break; 91 | } 92 | } 93 | 94 | 95 | #pragma mark - 96 | #pragma mark Memory management 97 | 98 | - (void)didReceiveMemoryWarning { 99 | // Releases the view if it doesn't have a superview. 100 | [super didReceiveMemoryWarning]; 101 | 102 | // Relinquish ownership any cached data, images, etc that aren't in use. 103 | } 104 | 105 | - (void)viewDidUnload { 106 | // Relinquish ownership of anything that can be recreated in viewDidLoad or on demand. 107 | // For example: self.myOutlet = nil; 108 | } 109 | 110 | 111 | - (void)dealloc { 112 | [postList release]; 113 | [super dealloc]; 114 | } 115 | 116 | 117 | @end 118 | 119 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/External Frameworks/.DS_Store -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 71 4 | /whatsonsvn/!svn/ver/4698/Facebook/External%20Frameworks/Facebook%20SDK 5 | END 6 | Facebook.h 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 82 10 | /whatsonsvn/!svn/ver/4698/Facebook/External%20Frameworks/Facebook%20SDK/Facebook.h 11 | END 12 | FBImageView.m 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 85 16 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/Facebook%20SDK/FBImageView.m 17 | END 18 | FBDialog.m 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 82 22 | /whatsonsvn/!svn/ver/4384/Facebook/External%20Frameworks/Facebook%20SDK/FBDialog.m 23 | END 24 | NSString+HTML.m 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 87 28 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/Facebook%20SDK/NSString+HTML.m 29 | END 30 | Facebook.m 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 82 34 | /whatsonsvn/!svn/ver/4698/Facebook/External%20Frameworks/Facebook%20SDK/Facebook.m 35 | END 36 | FBLoginDialog.h 37 | K 25 38 | svn:wc:ra_dav:version-url 39 | V 87 40 | /whatsonsvn/!svn/ver/4384/Facebook/External%20Frameworks/Facebook%20SDK/FBLoginDialog.h 41 | END 42 | FBRequest.h 43 | K 25 44 | svn:wc:ra_dav:version-url 45 | V 83 46 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/Facebook%20SDK/FBRequest.h 47 | END 48 | FBConnect.h 49 | K 25 50 | svn:wc:ra_dav:version-url 51 | V 83 52 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/Facebook%20SDK/FBConnect.h 53 | END 54 | FBImageView.h 55 | K 25 56 | svn:wc:ra_dav:version-url 57 | V 85 58 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/Facebook%20SDK/FBImageView.h 59 | END 60 | FBLoginDialog.m 61 | K 25 62 | svn:wc:ra_dav:version-url 63 | V 87 64 | /whatsonsvn/!svn/ver/4384/Facebook/External%20Frameworks/Facebook%20SDK/FBLoginDialog.m 65 | END 66 | FBRequest.m 67 | K 25 68 | svn:wc:ra_dav:version-url 69 | V 83 70 | /whatsonsvn/!svn/ver/4645/Facebook/External%20Frameworks/Facebook%20SDK/FBRequest.m 71 | END 72 | FBDialog.h 73 | K 25 74 | svn:wc:ra_dav:version-url 75 | V 82 76 | /whatsonsvn/!svn/ver/4384/Facebook/External%20Frameworks/Facebook%20SDK/FBDialog.h 77 | END 78 | NSString+HTML.h 79 | K 25 80 | svn:wc:ra_dav:version-url 81 | V 87 82 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/Facebook%20SDK/NSString+HTML.h 83 | END 84 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 4790 5 | https://andy@devel.napkinstudio.com/whatsonsvn/Facebook/External%20Frameworks/Facebook%20SDK 6 | https://andy@devel.napkinstudio.com/whatsonsvn 7 | 8 | 9 | 10 | 2011-02-16T15:22:52.586366Z 11 | 4698 12 | andy 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 08b9cd91-0817-4658-b78a-895965ed393e 28 | 29 | FBDialog.bundle 30 | dir 31 | 32 | Facebook.h 33 | file 34 | 35 | 36 | 37 | 38 | 2011-02-16T14:47:25.000000Z 39 | c983ff97e7f1ebf862daf83819522f2c 40 | 2011-02-16T15:22:52.586366Z 41 | 4698 42 | andy 43 | has-props 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 3275 65 | 66 | FBImageView.m 67 | file 68 | 69 | 70 | 71 | 72 | 2011-01-15T22:13:35.000000Z 73 | 0b02b49c0cb161b3179cbad966933cf6 74 | 2010-12-14T21:50:39.280725Z 75 | 3937 76 | andy 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 1957 99 | 100 | FBDialog.m 101 | file 102 | 103 | 104 | 105 | 106 | 2011-01-24T11:55:56.000000Z 107 | 7874a117b1f0bab809cdd4b0007932cc 108 | 2011-01-24T12:16:01.243179Z 109 | 4384 110 | andy 111 | has-props 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 22591 133 | 134 | NSString+HTML.m 135 | file 136 | 137 | 138 | 139 | 140 | 2011-01-15T22:13:35.000000Z 141 | b112d95eea407a39ac3e41b1a31c016e 142 | 2010-12-14T21:50:39.280725Z 143 | 3937 144 | andy 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 15800 167 | 168 | Facebook.m 169 | file 170 | 171 | 172 | 173 | 174 | 2011-02-16T14:49:56.000000Z 175 | b75a4b652a530270f1c31d6c137b750e 176 | 2011-02-16T15:22:52.586366Z 177 | 4698 178 | andy 179 | has-props 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 21384 201 | 202 | FBLoginDialog.h 203 | file 204 | 205 | 206 | 207 | 208 | 2011-01-24T11:35:32.000000Z 209 | 8901a58ba6d06e1c0a3455fda1a3bffb 210 | 2011-01-24T12:16:01.243179Z 211 | 4384 212 | andy 213 | has-props 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 1422 235 | 236 | FBRequest.h 237 | file 238 | 239 | 240 | 241 | 242 | 2011-01-15T22:13:35.000000Z 243 | cbaf3edc211a1044180986f2b615c637 244 | 2010-12-14T21:50:39.280725Z 245 | 3937 246 | andy 247 | has-props 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 3306 269 | 270 | FBConnect.h 271 | file 272 | 273 | 274 | 275 | 276 | 2011-01-15T22:13:35.000000Z 277 | c927e533fe5a0362d27abd5886cbeae8 278 | 2010-12-14T21:50:39.280725Z 279 | 3937 280 | andy 281 | has-props 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 706 303 | 304 | FBImageView.h 305 | file 306 | 307 | 308 | 309 | 310 | 2011-01-15T22:13:35.000000Z 311 | 4d4185a8b998da726f55c1d8e9232b1c 312 | 2010-12-14T21:50:39.280725Z 313 | 3937 314 | andy 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 368 337 | 338 | FBLoginDialog.m 339 | file 340 | 341 | 342 | 343 | 344 | 2011-01-24T11:40:48.000000Z 345 | 0f5a344738bf6727ce0bf65f6653d396 346 | 2011-01-24T12:16:01.243179Z 347 | 4384 348 | andy 349 | has-props 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 3649 371 | 372 | FBRequest.m 373 | file 374 | 375 | 376 | 377 | 378 | 2011-02-10T14:32:35.000000Z 379 | 8c7249c5df54ed02be598c9cd3ab9895 380 | 2011-02-10T16:39:21.249853Z 381 | 4645 382 | andy 383 | has-props 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 11323 405 | 406 | FBDialog.h 407 | file 408 | 409 | 410 | 411 | 412 | 2011-01-24T11:44:30.000000Z 413 | 1883a73f679057688565e7cca73b9071 414 | 2011-01-24T12:16:01.243179Z 415 | 4384 416 | andy 417 | has-props 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 4726 439 | 440 | NSString+HTML.h 441 | file 442 | 443 | 444 | 445 | 446 | 2011-01-15T22:13:35.000000Z 447 | 873e6161c66643a4a037fbd3746d54c4 448 | 2010-12-14T21:50:39.280725Z 449 | 3937 450 | andy 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 2249 473 | 474 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/prop-base/FBConnect.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/prop-base/FBDialog.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/prop-base/FBDialog.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/prop-base/FBLoginDialog.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/prop-base/FBLoginDialog.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/prop-base/FBRequest.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/prop-base/FBRequest.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/prop-base/Facebook.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/prop-base/Facebook.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/text-base/FBConnect.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "Facebook.h" 19 | #include "FBDialog.h" 20 | #include "FBLoginDialog.h" 21 | #include "FBRequest.h" 22 | #include "SBJSON.h" -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/text-base/FBDialog.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | #import 19 | 20 | @protocol FBDialogDelegate; 21 | 22 | /** 23 | * Do not use this interface directly, instead, use dialog in Facebook.h 24 | * 25 | * Facebook dialog interface for start the facebook webView UIServer Dialog. 26 | */ 27 | 28 | @interface FBDialog : UIView { 29 | id _delegate; 30 | NSMutableDictionary *_params; 31 | NSString * _serverURL; 32 | NSURL* _loadingURL; 33 | UIWebView* _webView; 34 | UIActivityIndicatorView* _spinner; 35 | UIImageView* _iconView; 36 | UILabel* _titleLabel; 37 | UIButton* _closeButton; 38 | UIDeviceOrientation _orientation; 39 | BOOL _showingKeyboard; 40 | 41 | // Ensures that UI elements behind the dialog are disabled. 42 | UIView* _modalBackgroundView; 43 | } 44 | 45 | /** 46 | * The delegate. 47 | */ 48 | @property(nonatomic,assign) id delegate; 49 | 50 | /** 51 | * The parameters. 52 | */ 53 | @property(nonatomic, retain) NSMutableDictionary* params; 54 | 55 | /** 56 | * The title that is shown in the header atop the view. 57 | */ 58 | @property(nonatomic,copy) NSString* title; 59 | 60 | - (NSString *) getStringFromUrl: (NSString*) url needle:(NSString *) needle; 61 | 62 | - (id)initWithURL: (NSString *) loadingURL 63 | params: (NSMutableDictionary *) params 64 | delegate: (id ) delegate; 65 | 66 | /** 67 | * Displays the view with an animation. 68 | * 69 | * The view will be added to the top of the current key window. 70 | */ 71 | - (void)show; 72 | 73 | /** 74 | * Displays the first page of the dialog. 75 | * 76 | * Do not ever call this directly. It is intended to be overriden by subclasses. 77 | */ 78 | - (void)load; 79 | 80 | /** 81 | * Displays a URL in the dialog. 82 | */ 83 | - (void)loadURL:(NSString*)url 84 | get:(NSDictionary*)getParams; 85 | 86 | /** 87 | * Hides the view and notifies delegates of success or cancellation. 88 | */ 89 | - (void)dismissWithSuccess:(BOOL)success animated:(BOOL)animated; 90 | 91 | /** 92 | * Hides the view and notifies delegates of an error. 93 | */ 94 | - (void)dismissWithError:(NSError*)error animated:(BOOL)animated; 95 | 96 | /** 97 | * Subclasses may override to perform actions just prior to showing the dialog. 98 | */ 99 | - (void)dialogWillAppear; 100 | 101 | /** 102 | * Subclasses may override to perform actions just after the dialog is hidden. 103 | */ 104 | - (void)dialogWillDisappear; 105 | 106 | /** 107 | * Subclasses should override to process data returned from the server in a 'fbconnect' url. 108 | * 109 | * Implementations must call dismissWithSuccess:YES at some point to hide the dialog. 110 | */ 111 | - (void)dialogDidSucceed:(NSURL *)url; 112 | 113 | /** 114 | * Subclasses should override to process data returned from the server in a 'fbconnect' url. 115 | * 116 | * Implementations must call dismissWithSuccess:YES at some point to hide the dialog. 117 | */ 118 | - (void)dialogDidCancel:(NSURL *)url; 119 | 120 | 121 | //new 122 | - (void) dialogRequestingCredentials; 123 | @end 124 | 125 | /////////////////////////////////////////////////////////////////////////////////////////////////// 126 | 127 | /* 128 | *Your application should implement this delegate 129 | */ 130 | @protocol FBDialogDelegate 131 | 132 | 133 | @optional 134 | 135 | /** 136 | * Called when the dialog succeeds and is about to be dismissed. 137 | */ 138 | - (void)dialogDidComplete:(FBDialog *)dialog; 139 | 140 | /** 141 | * Called when the dialog succeeds with a returning url. 142 | */ 143 | - (void)dialogCompleteWithUrl:(NSURL *)url; 144 | 145 | /** 146 | * Called when the dialog get canceled by the user. 147 | */ 148 | - (void)dialogDidNotCompleteWithUrl:(NSURL *)url; 149 | 150 | /** 151 | * Called when the dialog is cancelled and is about to be dismissed. 152 | */ 153 | - (void)dialogDidNotComplete:(FBDialog *)dialog; 154 | 155 | /** 156 | * Called when dialog failed to load due to an error. 157 | */ 158 | - (void)dialog:(FBDialog*)dialog didFailWithError:(NSError *)error; 159 | 160 | /** 161 | * Asks if a link touched by a user should be opened in an external browser. 162 | * 163 | * If a user touches a link, the default behavior is to open the link in the Safari browser, 164 | * which will cause your app to quit. You may want to prevent this from happening, open the link 165 | * in your own internal browser, or perhaps warn the user that they are about to leave your app. 166 | * If so, implement this method on your delegate and return NO. If you warn the user, you 167 | * should hold onto the URL and once you have received their acknowledgement open the URL yourself 168 | * using [[UIApplication sharedApplication] openURL:]. 169 | */ 170 | - (BOOL)dialog:(FBDialog*)dialog shouldOpenURLInExternalBrowser:(NSURL *)url; 171 | 172 | @end 173 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/text-base/FBImageView.h.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // FBImageView.h 3 | // FBP 4 | // 5 | // Created by David Stanfill on 12/7/10. 6 | // Copyright 2010 USN. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface FBImageView : UIImageView { 13 | BOOL loading; 14 | BOOL loaded; 15 | NSMutableData * data; 16 | UIImage * placeholder; 17 | NSString * url; 18 | NSURLConnection * connection; 19 | } 20 | 21 | 22 | @property (nonatomic, retain) NSString * url; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/text-base/FBImageView.m.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // FBImageView.m 3 | // FBP 4 | // 5 | // Created by David Stanfill on 12/7/10. 6 | // Copyright 2010 USN. All rights reserved. 7 | // 8 | 9 | #import "FBImageView.h" 10 | 11 | 12 | @implementation FBImageView 13 | 14 | 15 | - (id)initWithFrame:(CGRect)frame { 16 | 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | // Initialization code. 20 | loaded = NO; 21 | loading = NO; 22 | data = [[NSMutableData alloc] initWithLength:32768]; 23 | } 24 | return self; 25 | } 26 | 27 | - (void) load { 28 | 29 | NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; 30 | 31 | if ([NSURLConnection canHandleRequest:request]) { 32 | [connection release]; 33 | connection = [[NSURLConnection connectionWithRequest:request delegate:self] retain]; 34 | } 35 | } 36 | 37 | - (void) cancelLoad { 38 | [connection cancel]; 39 | [connection release]; 40 | connection = nil; 41 | } 42 | 43 | - (void) setUrl:(NSString *)newURL { 44 | if (url != newURL && ![url isEqual:newURL]) { 45 | [url release]; 46 | url = [newURL retain]; 47 | 48 | [self cancelLoad]; 49 | [self load]; 50 | } 51 | } 52 | 53 | 54 | - (void) didMoveToSuperview { 55 | if (self.superview) { 56 | if (!loaded && !loading) { 57 | // Start the load 58 | } 59 | } else { 60 | // Cancel load? 61 | } 62 | } 63 | 64 | - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { 65 | loading = NO; 66 | } 67 | 68 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { 69 | [data setLength:0]; 70 | } 71 | 72 | - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)newdata { 73 | [data appendData:newdata]; 74 | } 75 | 76 | - (void)connectionDidFinishLoading:(NSURLConnection *)connection { 77 | loading = NO; 78 | loaded = YES; 79 | UIImage * image = [UIImage imageWithData:data]; 80 | if (image) { 81 | self.image = image; 82 | [self sizeToFit]; 83 | // Self.superview should normally be a cell content view - self.superview.superview is therefore the cell view 84 | if (self.superview.superview) { 85 | [self.superview.superview setNeedsLayout]; 86 | } 87 | } 88 | [data setLength:0]; 89 | } 90 | 91 | - (void)dealloc { 92 | [connection cancel]; 93 | [connection release]; 94 | [super dealloc]; 95 | } 96 | 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/text-base/FBLoginDialog.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #import "FBDialog.h" 19 | 20 | @protocol FBLoginDialogDelegate; 21 | 22 | /** 23 | * Do not use this interface directly, instead, use authorize in Facebook.h 24 | * 25 | * Facebook Login Dialog interface for start the facebook webView login dialog. 26 | * It start pop-ups prompting for credentials and permissions. 27 | */ 28 | 29 | @interface FBLoginDialog : FBDialog { 30 | id _loginDelegate; 31 | } 32 | 33 | -(id) initWithURL:(NSString *) loginURL 34 | loginParams:(NSMutableDictionary *) params 35 | delegate:(id ) delegate; 36 | @end 37 | 38 | /////////////////////////////////////////////////////////////////////////////////////////////////// 39 | 40 | @protocol FBLoginDialogDelegate 41 | 42 | - (void)fbDialogLogin:(NSString*)token expirationDate:(NSDate*)expirationDate; 43 | 44 | - (void)fbDialogNotLogin:(BOOL)cancelled; 45 | 46 | - (void) fbRequestingCredentials; 47 | 48 | @end 49 | 50 | 51 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/text-base/FBLoginDialog.m.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "FBDialog.h" 18 | #import "FBLoginDialog.h" 19 | 20 | /////////////////////////////////////////////////////////////////////////////////////////////////// 21 | 22 | @implementation FBLoginDialog 23 | 24 | /////////////////////////////////////////////////////////////////////////////////////////////////// 25 | // public 26 | 27 | /* 28 | * initialize the FBLoginDialog with url and parameters 29 | */ 30 | - (id)initWithURL:(NSString*) loginURL 31 | loginParams:(NSMutableDictionary*) params 32 | delegate:(id ) delegate{ 33 | 34 | self = [super init]; 35 | _serverURL = [loginURL retain]; 36 | _params = [params retain]; 37 | _loginDelegate = delegate; 38 | 39 | return self; 40 | } 41 | 42 | /////////////////////////////////////////////////////////////////////////////////////////////////// 43 | // FBDialog 44 | 45 | /** 46 | * Override FBDialog : to call when the webView Dialog did succeed 47 | */ 48 | - (void) dialogDidSucceed:(NSURL*)url { 49 | NSString *q = [url absoluteString]; 50 | NSString *token = [self getStringFromUrl:q needle:@"access_token="]; 51 | NSString *expTime = [self getStringFromUrl:q needle:@"expires_in="]; 52 | NSDate *expirationDate =nil; 53 | 54 | if (expTime != nil) { 55 | int expVal = [expTime intValue]; 56 | if (expVal == 0) { 57 | expirationDate = [NSDate distantFuture]; 58 | } else { 59 | expirationDate = [NSDate dateWithTimeIntervalSinceNow:expVal]; 60 | } 61 | } 62 | 63 | //storing defaults so the user isn't prompted every time to login 64 | [[NSUserDefaults standardUserDefaults] setObject:token forKey:@"access_token"]; 65 | [[NSUserDefaults standardUserDefaults] setObject:expirationDate forKey:@"exp_date"]; 66 | [[NSUserDefaults standardUserDefaults] synchronize]; 67 | 68 | if ((token == (NSString *) [NSNull null]) || (token.length == 0)) { 69 | [self dialogDidCancel:url]; 70 | [self dismissWithSuccess:NO animated:YES]; 71 | } else { 72 | if ([_loginDelegate respondsToSelector:@selector(fbDialogLogin:expirationDate:)]) { 73 | [_loginDelegate fbDialogLogin:token expirationDate:expirationDate]; 74 | } 75 | [self dismissWithSuccess:YES animated:YES]; 76 | } 77 | } 78 | 79 | /** 80 | * Override FBDialog : to call with the login dialog get canceled 81 | */ 82 | - (void)dialogDidCancel:(NSURL *)url { 83 | [self dismissWithSuccess:NO animated:YES]; 84 | if ([_loginDelegate respondsToSelector:@selector(fbDialogNotLogin:)]) { 85 | [_loginDelegate fbDialogNotLogin:YES]; 86 | } 87 | } 88 | 89 | 90 | /* New Overriding from the base class*/ 91 | - (void) dialogRequestingCredentials { 92 | 93 | //added we don't want to display the dialog unless they need to login 94 | self.hidden = NO; 95 | 96 | // new facebook login dialog delegate method 97 | if ([_loginDelegate respondsToSelector:@selector(fbRequestingCredentials)]) 98 | [_loginDelegate fbRequestingCredentials]; 99 | } 100 | 101 | 102 | 103 | - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { 104 | if (!(([error.domain isEqualToString:@"NSURLErrorDomain"] && error.code == -999) || 105 | ([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102))) { 106 | [super webView:webView didFailLoadWithError:error]; 107 | if ([_loginDelegate respondsToSelector:@selector(fbDialogNotLogin:)]) { 108 | [_loginDelegate fbDialogNotLogin:NO]; 109 | } 110 | } 111 | } 112 | 113 | @end 114 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/text-base/FBRequest.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | #import 19 | 20 | @protocol FBRequestDelegate; 21 | 22 | /** 23 | * Do not use this interface directly, instead, use method in Facebook.h 24 | */ 25 | @interface FBRequest : NSObject { 26 | id _delegate; 27 | NSString* _url; 28 | NSString* _httpMethod; 29 | NSMutableDictionary* _params; 30 | NSURLConnection* _connection; 31 | NSMutableData* _responseText; 32 | } 33 | 34 | 35 | @property(nonatomic,assign) id delegate; 36 | 37 | /** 38 | * The URL which will be contacted to execute the request. 39 | */ 40 | @property(nonatomic,copy) NSString* url; 41 | 42 | /** 43 | * The API method which will be called. 44 | */ 45 | @property(nonatomic,copy) NSString* httpMethod; 46 | 47 | /** 48 | * The dictionary of parameters to pass to the method. 49 | * 50 | * These values in the dictionary will be converted to strings using the 51 | * standard Objective-C object-to-string conversion facilities. 52 | */ 53 | @property(nonatomic,retain) NSMutableDictionary* params; 54 | 55 | 56 | @property(nonatomic,assign) NSURLConnection* connection; 57 | 58 | @property(nonatomic,assign) NSMutableData* responseText; 59 | 60 | 61 | + (NSString*)serializeURL:(NSString *)baseUrl 62 | params:(NSDictionary *)params; 63 | 64 | + (NSString*)serializeURL:(NSString *)baseUrl 65 | params:(NSDictionary *)params 66 | httpMethod:(NSString *)httpMethod; 67 | 68 | + (FBRequest*)getRequestWithParams:(NSMutableDictionary *) params 69 | httpMethod:(NSString *) httpMethod 70 | delegate:(id)delegate 71 | requestURL:(NSString *) url; 72 | - (BOOL) loading; 73 | 74 | - (void) connect; 75 | 76 | @end 77 | 78 | /////////////////////////////////////////////////////////////////////////////////////////////////// 79 | 80 | /* 81 | *Your application should implement this delegate 82 | */ 83 | @protocol FBRequestDelegate 84 | 85 | @optional 86 | 87 | /** 88 | * Called just before the request is sent to the server. 89 | */ 90 | - (void)requestLoading:(FBRequest *)request; 91 | 92 | /** 93 | * Called when the server responds and begins to send back data. 94 | */ 95 | - (void)request:(FBRequest *)request didReceiveResponse:(NSURLResponse *)response; 96 | 97 | /** 98 | * Called when an error prevents the request from completing successfully. 99 | */ 100 | - (void)request:(FBRequest *)request didFailWithError:(NSError *)error; 101 | 102 | /** 103 | * Called when a request returns and its response has been parsed into an object. 104 | * 105 | * The resulting object may be a dictionary, an array, a string, or a number, depending 106 | * on thee format of the API response. 107 | */ 108 | - (void)request:(FBRequest *)request didLoad:(id)result; 109 | 110 | /** 111 | * Called when a request returns a response. 112 | * 113 | * The result object is the raw response from the server of type NSData 114 | */ 115 | - (void)request:(FBRequest *)request didLoadRawResponse:(NSData *)data; 116 | 117 | @end 118 | 119 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/text-base/Facebook.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "FBLoginDialog.h" 18 | #import "FBRequest.h" 19 | #import "FBNSObject.h" 20 | 21 | @protocol FBSessionDelegate; 22 | 23 | /** 24 | * Main Facebook interface for interacting with the Facebook developer API. 25 | * Provides methods to log in and log out a user, make requests using the REST 26 | * and Graph APIs, and start user interface interactions (such as 27 | * pop-ups promoting for credentials, permissions, stream posts, etc.) 28 | */ 29 | @interface Facebook : FBNSObject{ 30 | NSString* _accessToken; 31 | NSDate* _expirationDate; 32 | id _sessionDelegate; 33 | FBRequest* _request; 34 | FBDialog* _loginDialog; 35 | FBDialog* _fbDialog; 36 | NSString* _appId; 37 | NSArray* _permissions; 38 | } 39 | 40 | @property(nonatomic, copy) NSString* accessToken; 41 | 42 | @property(nonatomic, copy) NSDate* expirationDate; 43 | 44 | @property(nonatomic, assign) id sessionDelegate; 45 | 46 | 47 | - (void)authorize:(NSString *)application_id 48 | permissions:(NSArray *)permissions 49 | delegate:(id)delegate; 50 | 51 | - (BOOL)handleOpenURL:(NSURL *)url; 52 | 53 | - (void)logout:(id)delegate; 54 | 55 | - (void)requestWithParams:(NSMutableDictionary *)params 56 | andDelegate:(id )delegate; 57 | 58 | - (void)requestWithMethodName:(NSString *)methodName 59 | andParams:(NSMutableDictionary *)params 60 | andHttpMethod:(NSString *)httpMethod 61 | andDelegate:(id )delegate; 62 | 63 | - (void)requestWithGraphPath:(NSString *)graphPath 64 | andDelegate:(id )delegate; 65 | 66 | - (void)requestWithGraphPath:(NSString *)graphPath 67 | andParams:(NSMutableDictionary *)params 68 | andDelegate:(id )delegate; 69 | 70 | - (void)requestWithGraphPath:(NSString *)graphPath 71 | andParams:(NSMutableDictionary *)params 72 | andHttpMethod:(NSString *)httpMethod 73 | andDelegate:(id )delegate; 74 | 75 | - (void)dialog:(NSString *)action 76 | andDelegate:(id)delegate; 77 | 78 | - (void)dialog:(NSString *)action 79 | andParams:(NSMutableDictionary *)params 80 | andDelegate:(id )delegate; 81 | 82 | - (BOOL)isSessionValid; 83 | 84 | - (void) cancelRequest; 85 | 86 | @end 87 | 88 | //////////////////////////////////////////////////////////////////////////////// 89 | 90 | /** 91 | * Your application should implement this delegate to receive session callbacks. 92 | */ 93 | @protocol FBSessionDelegate 94 | 95 | @optional 96 | 97 | /** 98 | * Called when the user successfully logged in. 99 | */ 100 | - (void)fbDidLogin; 101 | 102 | /** 103 | * Called when the user dismissed the dialog without logging in. 104 | */ 105 | - (void)fbDidNotLogin:(BOOL)cancelled; 106 | 107 | /** 108 | * Called when the user logged out. 109 | */ 110 | - (void)fbDidLogout; 111 | 112 | @end 113 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/.svn/text-base/NSString+HTML.h.svn-base: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+HTML.h 3 | // 4 | // Dealing with NSStrings that contain HTML 5 | // 6 | // Copyright 2007 Google Inc. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not 9 | // use this file except in compliance with the License. You may obtain a copy 10 | // of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 16 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 17 | // License for the specific language governing permissions and limitations under 18 | // the License. 19 | // 20 | 21 | #import 22 | 23 | /// Utilities for NSStrings containing HTML 24 | @interface NSString (NSStringHTMLAdditions) 25 | 26 | /// Get a string where internal characters that need escaping for HTML are escaped 27 | // 28 | /// For example, '&' become '&'. This will only cover characters from table 29 | /// A.2.2 of http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters 30 | /// which is what you want for a unicode encoded webpage. If you have a ascii 31 | /// or non-encoded webpage, please use stringByEscapingAsciiHTML which will 32 | /// encode all characters. 33 | /// 34 | /// For obvious reasons this call is only safe once. 35 | // 36 | // Returns: 37 | // Autoreleased NSString 38 | // 39 | - (NSString *)stringByEscapingHTML; 40 | 41 | /// Get a string where internal characters that need escaping for HTML are escaped 42 | // 43 | /// For example, '&' become '&' 44 | /// All non-mapped characters (unicode that don't have a &keyword; mapping) 45 | /// will be converted to the appropriate &#xxx; value. If your webpage is 46 | /// unicode encoded (UTF16 or UTF8) use stringByEscapingHTML instead as it is 47 | /// faster, and produces less bloated and more readable HTML (as long as you 48 | /// are using a unicode compliant HTML reader). 49 | /// 50 | /// For obvious reasons this call is only safe once. 51 | // 52 | // Returns: 53 | // Autoreleased NSString 54 | // 55 | - (NSString *)stringByEscapingAsciiHTML; 56 | 57 | /// Get a string where internal characters that are escaped for HTML are unescaped 58 | // 59 | /// For example, '&' becomes '&' 60 | /// Handles and 2 cases as well 61 | /// 62 | // Returns: 63 | // Autoreleased NSString 64 | // 65 | - (NSString *)stringByUnescapingHTML; 66 | 67 | @end -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBConnect.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #include "Facebook.h" 19 | #include "FBDialog.h" 20 | #include "FBLoginDialog.h" 21 | #include "FBRequest.h" 22 | #include "SBJSON.h" -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 87 4 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/Facebook%20SDK/FBDialog.bundle 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 4790 5 | https://andy@devel.napkinstudio.com/whatsonsvn/Facebook/External%20Frameworks/Facebook%20SDK/FBDialog.bundle 6 | https://andy@devel.napkinstudio.com/whatsonsvn 7 | 8 | 9 | 10 | 2010-12-14T21:50:39.280725Z 11 | 3937 12 | andy 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 08b9cd91-0817-4658-b78a-895965ed393e 28 | 29 | images 30 | dir 31 | 32 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 94 4 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/Facebook%20SDK/FBDialog.bundle/images 5 | END 6 | fbicon.png 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 105 10 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/Facebook%20SDK/FBDialog.bundle/images/fbicon.png 11 | END 12 | close.png 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 104 16 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/Facebook%20SDK/FBDialog.bundle/images/close.png 17 | END 18 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 4790 5 | https://andy@devel.napkinstudio.com/whatsonsvn/Facebook/External%20Frameworks/Facebook%20SDK/FBDialog.bundle/images 6 | https://andy@devel.napkinstudio.com/whatsonsvn 7 | 8 | 9 | 10 | 2010-12-14T21:50:39.280725Z 11 | 3937 12 | andy 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 08b9cd91-0817-4658-b78a-895965ed393e 28 | 29 | fbicon.png 30 | file 31 | 32 | 33 | 34 | 35 | 2011-01-15T22:13:35.000000Z 36 | 71bf13a3c174fc1c93300fd13604c737 37 | 2010-12-14T21:50:39.280725Z 38 | 3937 39 | andy 40 | has-props 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 226 62 | 63 | close.png 64 | file 65 | 66 | 67 | 68 | 69 | 2011-01-15T22:13:35.000000Z 70 | d630d337691be4680802f676cf11ca7b 71 | 2010-12-14T21:50:39.280725Z 72 | 3937 73 | andy 74 | has-props 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 164 96 | 97 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/.svn/prop-base/close.png.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | K 13 6 | svn:mime-type 7 | V 24 8 | application/octet-stream 9 | END 10 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/.svn/prop-base/fbicon.png.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | K 13 6 | svn:mime-type 7 | V 24 8 | application/octet-stream 9 | END 10 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/.svn/text-base/close.png.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/.svn/text-base/close.png.svn-base -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/.svn/text-base/fbicon.png.svn-base: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/.svn/text-base/fbicon.png.svn-base -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/close.png -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/fbicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/External Frameworks/Facebook SDK/FBDialog.bundle/images/fbicon.png -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | #import 19 | 20 | @protocol FBDialogDelegate; 21 | 22 | /** 23 | * Do not use this interface directly, instead, use dialog in Facebook.h 24 | * 25 | * Facebook dialog interface for start the facebook webView UIServer Dialog. 26 | */ 27 | 28 | @interface FBDialog : UIView { 29 | id _delegate; 30 | NSMutableDictionary *_params; 31 | NSString * _serverURL; 32 | NSURL* _loadingURL; 33 | UIWebView* _webView; 34 | UIActivityIndicatorView* _spinner; 35 | UIImageView* _iconView; 36 | UILabel* _titleLabel; 37 | UIButton* _closeButton; 38 | UIDeviceOrientation _orientation; 39 | BOOL _showingKeyboard; 40 | 41 | // Ensures that UI elements behind the dialog are disabled. 42 | UIView* _modalBackgroundView; 43 | } 44 | 45 | /** 46 | * The delegate. 47 | */ 48 | @property(nonatomic,assign) id delegate; 49 | 50 | /** 51 | * The parameters. 52 | */ 53 | @property(nonatomic, retain) NSMutableDictionary* params; 54 | 55 | /** 56 | * The title that is shown in the header atop the view. 57 | */ 58 | @property(nonatomic,copy) NSString* title; 59 | 60 | - (NSString *) getStringFromUrl: (NSString*) url needle:(NSString *) needle; 61 | 62 | - (id)initWithURL: (NSString *) loadingURL 63 | params: (NSMutableDictionary *) params 64 | delegate: (id ) delegate; 65 | 66 | /** 67 | * Displays the view with an animation. 68 | * 69 | * The view will be added to the top of the current key window. 70 | */ 71 | - (void)show; 72 | 73 | /** 74 | * Displays the first page of the dialog. 75 | * 76 | * Do not ever call this directly. It is intended to be overriden by subclasses. 77 | */ 78 | - (void)load; 79 | 80 | /** 81 | * Displays a URL in the dialog. 82 | */ 83 | - (void)loadURL:(NSString*)url 84 | get:(NSDictionary*)getParams; 85 | 86 | /** 87 | * Hides the view and notifies delegates of success or cancellation. 88 | */ 89 | - (void)dismissWithSuccess:(BOOL)success animated:(BOOL)animated; 90 | 91 | /** 92 | * Hides the view and notifies delegates of an error. 93 | */ 94 | - (void)dismissWithError:(NSError*)error animated:(BOOL)animated; 95 | 96 | /** 97 | * Subclasses may override to perform actions just prior to showing the dialog. 98 | */ 99 | - (void)dialogWillAppear; 100 | 101 | /** 102 | * Subclasses may override to perform actions just after the dialog is hidden. 103 | */ 104 | - (void)dialogWillDisappear; 105 | 106 | /** 107 | * Subclasses should override to process data returned from the server in a 'fbconnect' url. 108 | * 109 | * Implementations must call dismissWithSuccess:YES at some point to hide the dialog. 110 | */ 111 | - (void)dialogDidSucceed:(NSURL *)url; 112 | 113 | /** 114 | * Subclasses should override to process data returned from the server in a 'fbconnect' url. 115 | * 116 | * Implementations must call dismissWithSuccess:YES at some point to hide the dialog. 117 | */ 118 | - (void)dialogDidCancel:(NSURL *)url; 119 | 120 | 121 | //new 122 | - (void) dialogRequestingCredentials; 123 | @end 124 | 125 | /////////////////////////////////////////////////////////////////////////////////////////////////// 126 | 127 | /* 128 | *Your application should implement this delegate 129 | */ 130 | @protocol FBDialogDelegate 131 | 132 | 133 | @optional 134 | 135 | /** 136 | * Called when the dialog succeeds and is about to be dismissed. 137 | */ 138 | - (void)dialogDidComplete:(FBDialog *)dialog; 139 | 140 | /** 141 | * Called when the dialog succeeds with a returning url. 142 | */ 143 | - (void)dialogCompleteWithUrl:(NSURL *)url; 144 | 145 | /** 146 | * Called when the dialog get canceled by the user. 147 | */ 148 | - (void)dialogDidNotCompleteWithUrl:(NSURL *)url; 149 | 150 | /** 151 | * Called when the dialog is cancelled and is about to be dismissed. 152 | */ 153 | - (void)dialogDidNotComplete:(FBDialog *)dialog; 154 | 155 | /** 156 | * Called when dialog failed to load due to an error. 157 | */ 158 | - (void)dialog:(FBDialog*)dialog didFailWithError:(NSError *)error; 159 | 160 | /** 161 | * Asks if a link touched by a user should be opened in an external browser. 162 | * 163 | * If a user touches a link, the default behavior is to open the link in the Safari browser, 164 | * which will cause your app to quit. You may want to prevent this from happening, open the link 165 | * in your own internal browser, or perhaps warn the user that they are about to leave your app. 166 | * If so, implement this method on your delegate and return NO. If you warn the user, you 167 | * should hold onto the URL and once you have received their acknowledgement open the URL yourself 168 | * using [[UIApplication sharedApplication] openURL:]. 169 | */ 170 | - (BOOL)dialog:(FBDialog*)dialog shouldOpenURLInExternalBrowser:(NSURL *)url; 171 | 172 | @end 173 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBImageView.h: -------------------------------------------------------------------------------- 1 | // 2 | // FBImageView.h 3 | // FBP 4 | // 5 | // Created by David Stanfill on 12/7/10. 6 | // Copyright 2010 USN. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | 12 | @interface FBImageView : UIImageView { 13 | BOOL loading; 14 | BOOL loaded; 15 | NSMutableData * data; 16 | UIImage * placeholder; 17 | NSString * url; 18 | NSURLConnection * connection; 19 | } 20 | 21 | 22 | @property (nonatomic, retain) NSString * url; 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBImageView.m: -------------------------------------------------------------------------------- 1 | // 2 | // FBImageView.m 3 | // FBP 4 | // 5 | // Created by David Stanfill on 12/7/10. 6 | // Copyright 2010 USN. All rights reserved. 7 | // 8 | 9 | #import "FBImageView.h" 10 | 11 | 12 | @implementation FBImageView 13 | 14 | 15 | - (id)initWithFrame:(CGRect)frame { 16 | 17 | self = [super initWithFrame:frame]; 18 | if (self) { 19 | // Initialization code. 20 | loaded = NO; 21 | loading = NO; 22 | data = [[NSMutableData alloc] initWithLength:32768]; 23 | } 24 | return self; 25 | } 26 | 27 | - (void) load { 28 | 29 | NSURLRequest * request = [NSURLRequest requestWithURL:[NSURL URLWithString:url]]; 30 | 31 | if ([NSURLConnection canHandleRequest:request]) { 32 | [connection release]; 33 | connection = [[NSURLConnection connectionWithRequest:request delegate:self] retain]; 34 | } 35 | } 36 | 37 | - (void) cancelLoad { 38 | [connection cancel]; 39 | [connection release]; 40 | connection = nil; 41 | } 42 | 43 | - (void) setUrl:(NSString *)newURL { 44 | if (url != newURL && ![url isEqual:newURL]) { 45 | [url release]; 46 | url = [newURL retain]; 47 | 48 | [self cancelLoad]; 49 | [self load]; 50 | } 51 | } 52 | 53 | 54 | - (void) didMoveToSuperview { 55 | if (self.superview) { 56 | if (!loaded && !loading) { 57 | // Start the load 58 | } 59 | } else { 60 | // Cancel load? 61 | } 62 | } 63 | 64 | - (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error { 65 | loading = NO; 66 | } 67 | 68 | - (void)connection:(NSURLConnection *)connection didReceiveResponse:(NSURLResponse *)response { 69 | [data setLength:0]; 70 | } 71 | 72 | - (void)connection:(NSURLConnection *)connection didReceiveData:(NSData *)newdata { 73 | [data appendData:newdata]; 74 | } 75 | 76 | - (void)connectionDidFinishLoading:(NSURLConnection *)connection { 77 | loading = NO; 78 | loaded = YES; 79 | UIImage * image = [UIImage imageWithData:data]; 80 | if (image) { 81 | self.image = image; 82 | [self sizeToFit]; 83 | // Self.superview should normally be a cell content view - self.superview.superview is therefore the cell view 84 | if (self.superview.superview) { 85 | [self.superview.superview setNeedsLayout]; 86 | } 87 | } 88 | [data setLength:0]; 89 | } 90 | 91 | - (void)dealloc { 92 | [connection cancel]; 93 | [connection release]; 94 | [super dealloc]; 95 | } 96 | 97 | 98 | @end 99 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBLoginDialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | 18 | #import "FBDialog.h" 19 | 20 | @protocol FBLoginDialogDelegate; 21 | 22 | /** 23 | * Do not use this interface directly, instead, use authorize in Facebook.h 24 | * 25 | * Facebook Login Dialog interface for start the facebook webView login dialog. 26 | * It start pop-ups prompting for credentials and permissions. 27 | */ 28 | 29 | @interface FBLoginDialog : FBDialog { 30 | id _loginDelegate; 31 | } 32 | 33 | -(id) initWithURL:(NSString *) loginURL 34 | loginParams:(NSMutableDictionary *) params 35 | delegate:(id ) delegate; 36 | @end 37 | 38 | /////////////////////////////////////////////////////////////////////////////////////////////////// 39 | 40 | @protocol FBLoginDialogDelegate 41 | 42 | - (void)fbDialogLogin:(NSString*)token expirationDate:(NSDate*)expirationDate; 43 | 44 | - (void)fbDialogNotLogin:(BOOL)cancelled; 45 | 46 | - (void) fbRequestingCredentials; 47 | 48 | @end 49 | 50 | 51 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBLoginDialog.m: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "FBDialog.h" 18 | #import "FBLoginDialog.h" 19 | 20 | /////////////////////////////////////////////////////////////////////////////////////////////////// 21 | 22 | @implementation FBLoginDialog 23 | 24 | /////////////////////////////////////////////////////////////////////////////////////////////////// 25 | // public 26 | 27 | /* 28 | * initialize the FBLoginDialog with url and parameters 29 | */ 30 | - (id)initWithURL:(NSString*) loginURL 31 | loginParams:(NSMutableDictionary*) params 32 | delegate:(id ) delegate{ 33 | 34 | self = [super init]; 35 | _serverURL = [loginURL retain]; 36 | _params = [params retain]; 37 | _loginDelegate = delegate; 38 | 39 | return self; 40 | } 41 | 42 | /////////////////////////////////////////////////////////////////////////////////////////////////// 43 | // FBDialog 44 | 45 | /** 46 | * Override FBDialog : to call when the webView Dialog did succeed 47 | */ 48 | - (void) dialogDidSucceed:(NSURL*)url { 49 | NSString *q = [url absoluteString]; 50 | NSString *token = [self getStringFromUrl:q needle:@"access_token="]; 51 | NSString *expTime = [self getStringFromUrl:q needle:@"expires_in="]; 52 | NSDate *expirationDate =nil; 53 | 54 | if (expTime != nil) { 55 | int expVal = [expTime intValue]; 56 | if (expVal == 0) { 57 | expirationDate = [NSDate distantFuture]; 58 | } else { 59 | expirationDate = [NSDate dateWithTimeIntervalSinceNow:expVal]; 60 | } 61 | } 62 | 63 | //storing defaults so the user isn't prompted every time to login 64 | [[NSUserDefaults standardUserDefaults] setObject:token forKey:@"access_token"]; 65 | [[NSUserDefaults standardUserDefaults] setObject:expirationDate forKey:@"exp_date"]; 66 | [[NSUserDefaults standardUserDefaults] synchronize]; 67 | 68 | if ((token == (NSString *) [NSNull null]) || (token.length == 0)) { 69 | [self dialogDidCancel:url]; 70 | [self dismissWithSuccess:NO animated:YES]; 71 | } else { 72 | if ([_loginDelegate respondsToSelector:@selector(fbDialogLogin:expirationDate:)]) { 73 | [_loginDelegate fbDialogLogin:token expirationDate:expirationDate]; 74 | } 75 | [self dismissWithSuccess:YES animated:YES]; 76 | } 77 | } 78 | 79 | /** 80 | * Override FBDialog : to call with the login dialog get canceled 81 | */ 82 | - (void)dialogDidCancel:(NSURL *)url { 83 | [self dismissWithSuccess:NO animated:YES]; 84 | if ([_loginDelegate respondsToSelector:@selector(fbDialogNotLogin:)]) { 85 | [_loginDelegate fbDialogNotLogin:YES]; 86 | } 87 | } 88 | 89 | 90 | /* New Overriding from the base class*/ 91 | - (void) dialogRequestingCredentials { 92 | 93 | //added we don't want to display the dialog unless they need to login 94 | self.hidden = NO; 95 | 96 | // new facebook login dialog delegate method 97 | if ([_loginDelegate respondsToSelector:@selector(fbRequestingCredentials)]) 98 | [_loginDelegate fbRequestingCredentials]; 99 | } 100 | 101 | 102 | 103 | - (void)webView:(UIWebView *)webView didFailLoadWithError:(NSError *)error { 104 | if (!(([error.domain isEqualToString:@"NSURLErrorDomain"] && error.code == -999) || 105 | ([error.domain isEqualToString:@"WebKitErrorDomain"] && error.code == 102))) { 106 | [super webView:webView didFailLoadWithError:error]; 107 | if ([_loginDelegate respondsToSelector:@selector(fbDialogNotLogin:)]) { 108 | [_loginDelegate fbDialogNotLogin:NO]; 109 | } 110 | } 111 | } 112 | 113 | @end 114 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/FBRequest.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import 18 | #import 19 | 20 | @protocol FBRequestDelegate; 21 | 22 | /** 23 | * Do not use this interface directly, instead, use method in Facebook.h 24 | */ 25 | @interface FBRequest : NSObject { 26 | id _delegate; 27 | NSString* _url; 28 | NSString* _httpMethod; 29 | NSMutableDictionary* _params; 30 | NSURLConnection* _connection; 31 | NSMutableData* _responseText; 32 | } 33 | 34 | 35 | @property(nonatomic,assign) id delegate; 36 | 37 | /** 38 | * The URL which will be contacted to execute the request. 39 | */ 40 | @property(nonatomic,copy) NSString* url; 41 | 42 | /** 43 | * The API method which will be called. 44 | */ 45 | @property(nonatomic,copy) NSString* httpMethod; 46 | 47 | /** 48 | * The dictionary of parameters to pass to the method. 49 | * 50 | * These values in the dictionary will be converted to strings using the 51 | * standard Objective-C object-to-string conversion facilities. 52 | */ 53 | @property(nonatomic,retain) NSMutableDictionary* params; 54 | 55 | 56 | @property(nonatomic,assign) NSURLConnection* connection; 57 | 58 | @property(nonatomic,assign) NSMutableData* responseText; 59 | 60 | 61 | + (NSString*)serializeURL:(NSString *)baseUrl 62 | params:(NSDictionary *)params; 63 | 64 | + (NSString*)serializeURL:(NSString *)baseUrl 65 | params:(NSDictionary *)params 66 | httpMethod:(NSString *)httpMethod; 67 | 68 | + (FBRequest*)getRequestWithParams:(NSMutableDictionary *) params 69 | httpMethod:(NSString *) httpMethod 70 | delegate:(id)delegate 71 | requestURL:(NSString *) url; 72 | - (BOOL) loading; 73 | 74 | - (void) connect; 75 | 76 | @end 77 | 78 | /////////////////////////////////////////////////////////////////////////////////////////////////// 79 | 80 | /* 81 | *Your application should implement this delegate 82 | */ 83 | @protocol FBRequestDelegate 84 | 85 | @optional 86 | 87 | /** 88 | * Called just before the request is sent to the server. 89 | */ 90 | - (void)requestLoading:(FBRequest *)request; 91 | 92 | /** 93 | * Called when the server responds and begins to send back data. 94 | */ 95 | - (void)request:(FBRequest *)request didReceiveResponse:(NSURLResponse *)response; 96 | 97 | /** 98 | * Called when an error prevents the request from completing successfully. 99 | */ 100 | - (void)request:(FBRequest *)request didFailWithError:(NSError *)error; 101 | 102 | /** 103 | * Called when a request returns and its response has been parsed into an object. 104 | * 105 | * The resulting object may be a dictionary, an array, a string, or a number, depending 106 | * on thee format of the API response. 107 | */ 108 | - (void)request:(FBRequest *)request didLoad:(id)result; 109 | 110 | /** 111 | * Called when a request returns a response. 112 | * 113 | * The result object is the raw response from the server of type NSData 114 | */ 115 | - (void)request:(FBRequest *)request didLoadRawResponse:(NSData *)data; 116 | 117 | @end 118 | 119 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/Facebook.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2010 Facebook 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #import "FBLoginDialog.h" 18 | #import "FBRequest.h" 19 | 20 | @protocol FBSessionDelegate; 21 | 22 | /** 23 | * Main Facebook interface for interacting with the Facebook developer API. 24 | * Provides methods to log in and log out a user, make requests using the REST 25 | * and Graph APIs, and start user interface interactions (such as 26 | * pop-ups promoting for credentials, permissions, stream posts, etc.) 27 | */ 28 | @interface Facebook : NSObject{ 29 | NSString* _accessToken; 30 | NSDate* _expirationDate; 31 | id _sessionDelegate; 32 | FBRequest* _request; 33 | FBDialog* _loginDialog; 34 | FBDialog* _fbDialog; 35 | NSString* _appId; 36 | NSArray* _permissions; 37 | } 38 | 39 | @property(nonatomic, copy) NSString* accessToken; 40 | 41 | @property(nonatomic, copy) NSDate* expirationDate; 42 | 43 | @property(nonatomic, assign) id sessionDelegate; 44 | 45 | 46 | - (void)authorize:(NSString *)application_id 47 | permissions:(NSArray *)permissions 48 | delegate:(id)delegate; 49 | 50 | - (BOOL)handleOpenURL:(NSURL *)url; 51 | 52 | - (void)logout:(id)delegate; 53 | 54 | - (void)requestWithParams:(NSMutableDictionary *)params 55 | andDelegate:(id )delegate; 56 | 57 | - (void)requestWithMethodName:(NSString *)methodName 58 | andParams:(NSMutableDictionary *)params 59 | andHttpMethod:(NSString *)httpMethod 60 | andDelegate:(id )delegate; 61 | 62 | - (void)requestWithGraphPath:(NSString *)graphPath 63 | andDelegate:(id )delegate; 64 | 65 | - (void)requestWithGraphPath:(NSString *)graphPath 66 | andParams:(NSMutableDictionary *)params 67 | andDelegate:(id )delegate; 68 | 69 | - (void)requestWithGraphPath:(NSString *)graphPath 70 | andParams:(NSMutableDictionary *)params 71 | andHttpMethod:(NSString *)httpMethod 72 | andDelegate:(id )delegate; 73 | 74 | - (void)dialog:(NSString *)action 75 | andDelegate:(id)delegate; 76 | 77 | - (void)dialog:(NSString *)action 78 | andParams:(NSMutableDictionary *)params 79 | andDelegate:(id )delegate; 80 | 81 | - (BOOL)isSessionValid; 82 | 83 | - (void) cancelRequest; 84 | 85 | @end 86 | 87 | //////////////////////////////////////////////////////////////////////////////// 88 | 89 | /** 90 | * Your application should implement this delegate to receive session callbacks. 91 | */ 92 | @protocol FBSessionDelegate 93 | 94 | @optional 95 | 96 | /** 97 | * Called when the user successfully logged in. 98 | */ 99 | - (void)fbDidLogin; 100 | 101 | /** 102 | * Called when the user dismissed the dialog without logging in. 103 | */ 104 | - (void)fbDidNotLogin:(BOOL)cancelled; 105 | 106 | /** 107 | * Called when the user logged out. 108 | */ 109 | - (void)fbDidLogout; 110 | 111 | @end 112 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/Facebook SDK/NSString+HTML.h: -------------------------------------------------------------------------------- 1 | // 2 | // NSString+HTML.h 3 | // 4 | // Dealing with NSStrings that contain HTML 5 | // 6 | // Copyright 2007 Google Inc. 7 | // 8 | // Licensed under the Apache License, Version 2.0 (the "License"); you may not 9 | // use this file except in compliance with the License. You may obtain a copy 10 | // of the License at 11 | // 12 | // http://www.apache.org/licenses/LICENSE-2.0 13 | // 14 | // Unless required by applicable law or agreed to in writing, software 15 | // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 16 | // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 17 | // License for the specific language governing permissions and limitations under 18 | // the License. 19 | // 20 | 21 | #import 22 | 23 | /// Utilities for NSStrings containing HTML 24 | @interface NSString (NSStringHTMLAdditions) 25 | 26 | /// Get a string where internal characters that need escaping for HTML are escaped 27 | // 28 | /// For example, '&' become '&'. This will only cover characters from table 29 | /// A.2.2 of http://www.w3.org/TR/xhtml1/dtds.html#a_dtd_Special_characters 30 | /// which is what you want for a unicode encoded webpage. If you have a ascii 31 | /// or non-encoded webpage, please use stringByEscapingAsciiHTML which will 32 | /// encode all characters. 33 | /// 34 | /// For obvious reasons this call is only safe once. 35 | // 36 | // Returns: 37 | // Autoreleased NSString 38 | // 39 | - (NSString *)stringByEscapingHTML; 40 | 41 | /// Get a string where internal characters that need escaping for HTML are escaped 42 | // 43 | /// For example, '&' become '&' 44 | /// All non-mapped characters (unicode that don't have a &keyword; mapping) 45 | /// will be converted to the appropriate &#xxx; value. If your webpage is 46 | /// unicode encoded (UTF16 or UTF8) use stringByEscapingHTML instead as it is 47 | /// faster, and produces less bloated and more readable HTML (as long as you 48 | /// are using a unicode compliant HTML reader). 49 | /// 50 | /// For obvious reasons this call is only safe once. 51 | // 52 | // Returns: 53 | // Autoreleased NSString 54 | // 55 | - (NSString *)stringByEscapingAsciiHTML; 56 | 57 | /// Get a string where internal characters that are escaped for HTML are unescaped 58 | // 59 | /// For example, '&' becomes '&' 60 | /// Handles and 2 cases as well 61 | /// 62 | // Returns: 63 | // Autoreleased NSString 64 | // 65 | - (NSString *)stringByUnescapingHTML; 66 | 67 | @end -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/all-wcprops: -------------------------------------------------------------------------------- 1 | K 25 2 | svn:wc:ra_dav:version-url 3 | V 61 4 | /whatsonsvn/!svn/ver/4645/Facebook/External%20Frameworks/JSON 5 | END 6 | JSON.h 7 | K 25 8 | svn:wc:ra_dav:version-url 9 | V 68 10 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/JSON/JSON.h 11 | END 12 | SBJsonBase.h 13 | K 25 14 | svn:wc:ra_dav:version-url 15 | V 74 16 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/JSON/SBJsonBase.h 17 | END 18 | SBJsonParser.h 19 | K 25 20 | svn:wc:ra_dav:version-url 21 | V 76 22 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/JSON/SBJsonParser.h 23 | END 24 | SBJsonWriter.h 25 | K 25 26 | svn:wc:ra_dav:version-url 27 | V 76 28 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/JSON/SBJsonWriter.h 29 | END 30 | SBJSON.h 31 | K 25 32 | svn:wc:ra_dav:version-url 33 | V 70 34 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/JSON/SBJSON.h 35 | END 36 | SBJsonBase.m 37 | K 25 38 | svn:wc:ra_dav:version-url 39 | V 74 40 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/JSON/SBJsonBase.m 41 | END 42 | SBJsonParser.m 43 | K 25 44 | svn:wc:ra_dav:version-url 45 | V 76 46 | /whatsonsvn/!svn/ver/4645/Facebook/External%20Frameworks/JSON/SBJsonParser.m 47 | END 48 | SBJsonWriter.m 49 | K 25 50 | svn:wc:ra_dav:version-url 51 | V 76 52 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/JSON/SBJsonWriter.m 53 | END 54 | NSObject+SBJSON.h 55 | K 25 56 | svn:wc:ra_dav:version-url 57 | V 79 58 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/JSON/NSObject+SBJSON.h 59 | END 60 | NSString+SBJSON.h 61 | K 25 62 | svn:wc:ra_dav:version-url 63 | V 79 64 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/JSON/NSString+SBJSON.h 65 | END 66 | SBJSON.m 67 | K 25 68 | svn:wc:ra_dav:version-url 69 | V 70 70 | /whatsonsvn/!svn/ver/3937/Facebook/External%20Frameworks/JSON/SBJSON.m 71 | END 72 | NSObject+SBJSON.m 73 | K 25 74 | svn:wc:ra_dav:version-url 75 | V 79 76 | /whatsonsvn/!svn/ver/4645/Facebook/External%20Frameworks/JSON/NSObject+SBJSON.m 77 | END 78 | NSString+SBJSON.m 79 | K 25 80 | svn:wc:ra_dav:version-url 81 | V 79 82 | /whatsonsvn/!svn/ver/4645/Facebook/External%20Frameworks/JSON/NSString+SBJSON.m 83 | END 84 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/entries: -------------------------------------------------------------------------------- 1 | 10 2 | 3 | dir 4 | 4790 5 | https://andy@devel.napkinstudio.com/whatsonsvn/Facebook/External%20Frameworks/JSON 6 | https://andy@devel.napkinstudio.com/whatsonsvn 7 | 8 | 9 | 10 | 2011-02-10T16:39:21.249853Z 11 | 4645 12 | andy 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 08b9cd91-0817-4658-b78a-895965ed393e 28 | 29 | JSON.h 30 | file 31 | 32 | 33 | 34 | 35 | 2011-01-15T22:13:35.000000Z 36 | ae257619c962a55d5fa93b7825837756 37 | 2010-12-14T21:50:39.280725Z 38 | 3937 39 | andy 40 | has-props 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 2297 62 | 63 | SBJsonBase.h 64 | file 65 | 66 | 67 | 68 | 69 | 2011-01-15T22:13:35.000000Z 70 | 048b288f47c5a61c084536c82c81f9af 71 | 2010-12-14T21:50:39.280725Z 72 | 3937 73 | andy 74 | has-props 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 2946 96 | 97 | SBJsonParser.h 98 | file 99 | 100 | 101 | 102 | 103 | 2011-01-15T22:13:35.000000Z 104 | a144e6967ed27047ee00fba36f60b848 105 | 2010-12-14T21:50:39.280725Z 106 | 3937 107 | andy 108 | has-props 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 3083 130 | 131 | SBJsonWriter.h 132 | file 133 | 134 | 135 | 136 | 137 | 2011-01-15T22:13:35.000000Z 138 | 37d52748720cd2c19cd2cfa16baa6f14 139 | 2010-12-14T21:50:39.280725Z 140 | 3937 141 | andy 142 | has-props 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 4416 164 | 165 | SBJSON.h 166 | file 167 | 168 | 169 | 170 | 171 | 2011-01-15T22:13:35.000000Z 172 | 23022b462daf29618e033215c58aac94 173 | 2010-12-14T21:50:39.280725Z 174 | 3937 175 | andy 176 | has-props 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 2797 198 | 199 | SBJsonBase.m 200 | file 201 | 202 | 203 | 204 | 205 | 2011-01-15T22:13:35.000000Z 206 | 4885652fed0a995c1aff1cf47c15117c 207 | 2010-12-14T21:50:39.280725Z 208 | 3937 209 | andy 210 | has-props 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 2753 232 | 233 | SBJsonParser.m 234 | file 235 | 236 | 237 | 238 | 239 | 2011-02-10T14:35:58.000000Z 240 | 1750d76286e785c62393480be9a36cda 241 | 2011-02-10T16:39:21.249853Z 242 | 4645 243 | andy 244 | has-props 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 14034 266 | 267 | SBJsonWriter.m 268 | file 269 | 270 | 271 | 272 | 273 | 2011-01-15T22:13:35.000000Z 274 | 92548eb6ea5c890522c2d342b41d9682 275 | 2010-12-14T21:50:39.280725Z 276 | 3937 277 | andy 278 | has-props 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 7974 300 | 301 | NSObject+SBJSON.h 302 | file 303 | 304 | 305 | 306 | 307 | 2011-01-15T22:13:35.000000Z 308 | f7f559bceafad09d4253aaf5048d33e6 309 | 2010-12-14T21:50:39.280725Z 310 | 3937 311 | andy 312 | has-props 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 2561 334 | 335 | NSString+SBJSON.h 336 | file 337 | 338 | 339 | 340 | 341 | 2011-01-15T22:13:35.000000Z 342 | b133112104c190709fbbd07da0ee7b2c 343 | 2010-12-14T21:50:39.280725Z 344 | 3937 345 | andy 346 | has-props 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 2326 368 | 369 | SBJSON.m 370 | file 371 | 372 | 373 | 374 | 375 | 2011-01-15T22:13:35.000000Z 376 | 53d1eb806d6cc3dab7e82238b29c8f4e 377 | 2010-12-14T21:50:39.280725Z 378 | 3937 379 | andy 380 | has-props 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 6844 402 | 403 | NSObject+SBJSON.m 404 | file 405 | 406 | 407 | 408 | 409 | 2011-02-10T14:35:29.000000Z 410 | 17bea3d6feb69624979025542f780d53 411 | 2011-02-10T16:39:21.249853Z 412 | 4645 413 | andy 414 | has-props 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 2210 436 | 437 | NSString+SBJSON.m 438 | file 439 | 440 | 441 | 442 | 443 | 2011-02-10T14:35:50.000000Z 444 | 54ebc1314d2418df46993dcd4d2b9cd0 445 | 2011-02-10T16:39:21.249853Z 446 | 4645 447 | andy 448 | has-props 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 2177 470 | 471 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/JSON.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/NSObject+SBJSON.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/NSObject+SBJSON.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/NSString+SBJSON.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/NSString+SBJSON.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/SBJSON.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/SBJSON.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/SBJsonBase.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/SBJsonBase.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/SBJsonParser.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/SBJsonParser.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/SBJsonWriter.h.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/prop-base/SBJsonWriter.m.svn-base: -------------------------------------------------------------------------------- 1 | K 14 2 | svn:executable 3 | V 0 4 | 5 | END 6 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/JSON.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | /** 31 | @mainpage A strict JSON parser and generator for Objective-C 32 | 33 | JSON (JavaScript Object Notation) is a lightweight data-interchange 34 | format. This framework provides two apis for parsing and generating 35 | JSON. One standard object-based and a higher level api consisting of 36 | categories added to existing Objective-C classes. 37 | 38 | Learn more on the http://code.google.com/p/json-framework project site. 39 | 40 | This framework does its best to be as strict as possible, both in what it 41 | accepts and what it generates. For example, it does not support trailing commas 42 | in arrays or objects. Nor does it support embedded comments, or 43 | anything else not in the JSON specification. This is considered a feature. 44 | 45 | */ 46 | 47 | #import "SBJSON.h" 48 | #import "NSObject+SBJSON.h" 49 | #import "NSString+SBJSON.h" 50 | 51 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/NSObject+SBJSON.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | 32 | 33 | /** 34 | @brief Adds JSON generation to Foundation classes 35 | 36 | This is a category on NSObject that adds methods for returning JSON representations 37 | of standard objects to the objects themselves. This means you can call the 38 | -JSONRepresentation method on an NSArray object and it'll do what you want. 39 | */ 40 | @interface NSObject (NSObject_SBJSON) 41 | 42 | /** 43 | @brief Returns a string containing the receiver encoded as a JSON fragment. 44 | 45 | This method is added as a category on NSObject but is only actually 46 | supported for the following objects: 47 | @li NSDictionary 48 | @li NSArray 49 | @li NSString 50 | @li NSNumber (also used for booleans) 51 | @li NSNull 52 | 53 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 54 | */ 55 | - (NSString *)JSONFragment; 56 | 57 | /** 58 | @brief Returns a string containing the receiver encoded in JSON. 59 | 60 | This method is added as a category on NSObject but is only actually 61 | supported for the following objects: 62 | @li NSDictionary 63 | @li NSArray 64 | */ 65 | - (NSString *)JSONRepresentation; 66 | 67 | @end 68 | 69 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/NSObject+SBJSON.m.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "NSObject+SBJSON.h" 31 | #import "SBJsonWriter.h" 32 | 33 | @implementation NSObject (NSObject_SBJSON) 34 | 35 | - (NSString *)JSONFragment { 36 | SBJsonWriter *jsonWriter = [SBJsonWriter new]; 37 | NSString *json = [jsonWriter stringWithFragment:self]; 38 | if (!json) 39 | //NSLog(@"-JSONFragment failed. Error trace is: %@", [jsonWriter errorTrace]); 40 | [jsonWriter release]; 41 | return json; 42 | } 43 | 44 | - (NSString *)JSONRepresentation { 45 | SBJsonWriter *jsonWriter = [SBJsonWriter new]; 46 | NSString *json = [jsonWriter stringWithObject:self]; 47 | if (!json) 48 | // NSLog(@"-JSONRepresentation failed. Error trace is: %@", [jsonWriter errorTrace]); 49 | [jsonWriter release]; 50 | return json; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/NSString+SBJSON.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | 32 | /** 33 | @brief Adds JSON parsing methods to NSString 34 | 35 | This is a category on NSString that adds methods for parsing the target string. 36 | */ 37 | @interface NSString (NSString_SBJSON) 38 | 39 | 40 | /** 41 | @brief Returns the object represented in the receiver, or nil on error. 42 | 43 | Returns a a scalar object represented by the string's JSON fragment representation. 44 | 45 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 46 | */ 47 | - (id)JSONFragmentValue; 48 | 49 | /** 50 | @brief Returns the NSDictionary or NSArray represented by the current string's JSON representation. 51 | 52 | Returns the dictionary or array represented in the receiver, or nil on error. 53 | 54 | Returns the NSDictionary or NSArray represented by the current string's JSON representation. 55 | */ 56 | - (id)JSONValue; 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/NSString+SBJSON.m.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007-2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "NSString+SBJSON.h" 31 | #import "SBJsonParser.h" 32 | 33 | @implementation NSString (NSString_SBJSON) 34 | 35 | - (id)JSONFragmentValue 36 | { 37 | SBJsonParser *jsonParser = [SBJsonParser new]; 38 | id repr = [jsonParser fragmentWithString:self]; 39 | if (!repr) 40 | //NSLog(@"-JSONFragmentValue failed. Error trace is: %@", [jsonParser errorTrace]); 41 | [jsonParser release]; 42 | return repr; 43 | } 44 | 45 | - (id)JSONValue 46 | { 47 | SBJsonParser *jsonParser = [SBJsonParser new]; 48 | id repr = [jsonParser objectWithString:self]; 49 | if (!repr) 50 | //NSLog(@"-JSONValue failed. Error trace is: %@", [jsonParser errorTrace]); 51 | [jsonParser release]; 52 | return repr; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/SBJSON.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007-2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | #import "SBJsonParser.h" 32 | #import "SBJsonWriter.h" 33 | 34 | /** 35 | @brief Facade for SBJsonWriter/SBJsonParser. 36 | 37 | Requests are forwarded to instances of SBJsonWriter and SBJsonParser. 38 | */ 39 | @interface SBJSON : SBJsonBase { 40 | 41 | @private 42 | SBJsonParser *jsonParser; 43 | SBJsonWriter *jsonWriter; 44 | } 45 | 46 | 47 | /// Return the fragment represented by the given string 48 | - (id)fragmentWithString:(NSString*)jsonrep 49 | error:(NSError**)error; 50 | 51 | /// Return the object represented by the given string 52 | - (id)objectWithString:(NSString*)jsonrep 53 | error:(NSError**)error; 54 | 55 | /// Parse the string and return the represented object (or scalar) 56 | - (id)objectWithString:(id)value 57 | allowScalar:(BOOL)x 58 | error:(NSError**)error; 59 | 60 | 61 | /// Return JSON representation of an array or dictionary 62 | - (NSString*)stringWithObject:(id)value 63 | error:(NSError**)error; 64 | 65 | /// Return JSON representation of any legal JSON value 66 | - (NSString*)stringWithFragment:(id)value 67 | error:(NSError**)error; 68 | 69 | /// Return JSON representation (or fragment) for the given object 70 | - (NSString*)stringWithObject:(id)value 71 | allowScalar:(BOOL)x 72 | error:(NSError**)error; 73 | 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/SBJSON.m.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007-2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "SBJSON.h" 31 | 32 | @implementation SBJSON 33 | 34 | - (id)init { 35 | self = [super init]; 36 | if (self) { 37 | jsonWriter = [SBJsonWriter new]; 38 | jsonParser = [SBJsonParser new]; 39 | [self setMaxDepth:512]; 40 | 41 | } 42 | return self; 43 | } 44 | 45 | - (void)dealloc { 46 | [jsonWriter release]; 47 | [jsonParser release]; 48 | [super dealloc]; 49 | } 50 | 51 | #pragma mark Writer 52 | 53 | 54 | - (NSString *)stringWithObject:(id)obj { 55 | NSString *repr = [jsonWriter stringWithObject:obj]; 56 | if (repr) 57 | return repr; 58 | 59 | [errorTrace release]; 60 | errorTrace = [[jsonWriter errorTrace] mutableCopy]; 61 | return nil; 62 | } 63 | 64 | /** 65 | Returns a string containing JSON representation of the passed in value, or nil on error. 66 | If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. 67 | 68 | @param value any instance that can be represented as a JSON fragment 69 | @param allowScalar wether to return json fragments for scalar objects 70 | @param error used to return an error by reference (pass NULL if this is not desired) 71 | 72 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 73 | */ 74 | - (NSString*)stringWithObject:(id)value allowScalar:(BOOL)allowScalar error:(NSError**)error { 75 | 76 | NSString *json = allowScalar ? [jsonWriter stringWithFragment:value] : [jsonWriter stringWithObject:value]; 77 | if (json) 78 | return json; 79 | 80 | [errorTrace release]; 81 | errorTrace = [[jsonWriter errorTrace] mutableCopy]; 82 | 83 | if (error) 84 | *error = [errorTrace lastObject]; 85 | return nil; 86 | } 87 | 88 | /** 89 | Returns a string containing JSON representation of the passed in value, or nil on error. 90 | If nil is returned and @p error is not NULL, @p error can be interrogated to find the cause of the error. 91 | 92 | @param value any instance that can be represented as a JSON fragment 93 | @param error used to return an error by reference (pass NULL if this is not desired) 94 | 95 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 96 | */ 97 | - (NSString*)stringWithFragment:(id)value error:(NSError**)error { 98 | return [self stringWithObject:value 99 | allowScalar:YES 100 | error:error]; 101 | } 102 | 103 | /** 104 | Returns a string containing JSON representation of the passed in value, or nil on error. 105 | If nil is returned and @p error is not NULL, @p error can be interrogated to find the cause of the error. 106 | 107 | @param value a NSDictionary or NSArray instance 108 | @param error used to return an error by reference (pass NULL if this is not desired) 109 | */ 110 | - (NSString*)stringWithObject:(id)value error:(NSError**)error { 111 | return [self stringWithObject:value 112 | allowScalar:NO 113 | error:error]; 114 | } 115 | 116 | #pragma mark Parsing 117 | 118 | - (id)objectWithString:(NSString *)repr { 119 | id obj = [jsonParser objectWithString:repr]; 120 | if (obj) 121 | return obj; 122 | 123 | [errorTrace release]; 124 | errorTrace = [[jsonParser errorTrace] mutableCopy]; 125 | 126 | return nil; 127 | } 128 | 129 | /** 130 | Returns the object represented by the passed-in string or nil on error. The returned object can be 131 | a string, number, boolean, null, array or dictionary. 132 | 133 | @param value the json string to parse 134 | @param allowScalar whether to return objects for JSON fragments 135 | @param error used to return an error by reference (pass NULL if this is not desired) 136 | 137 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 138 | */ 139 | - (id)objectWithString:(id)value allowScalar:(BOOL)allowScalar error:(NSError**)error { 140 | 141 | id obj = allowScalar ? [jsonParser fragmentWithString:value] : [jsonParser objectWithString:value]; 142 | if (obj) 143 | return obj; 144 | 145 | [errorTrace release]; 146 | errorTrace = [[jsonParser errorTrace] mutableCopy]; 147 | 148 | if (error) 149 | *error = [errorTrace lastObject]; 150 | return nil; 151 | } 152 | 153 | /** 154 | Returns the object represented by the passed-in string or nil on error. The returned object can be 155 | a string, number, boolean, null, array or dictionary. 156 | 157 | @param repr the json string to parse 158 | @param error used to return an error by reference (pass NULL if this is not desired) 159 | 160 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 161 | */ 162 | - (id)fragmentWithString:(NSString*)repr error:(NSError**)error { 163 | return [self objectWithString:repr 164 | allowScalar:YES 165 | error:error]; 166 | } 167 | 168 | /** 169 | Returns the object represented by the passed-in string or nil on error. The returned object 170 | will be either a dictionary or an array. 171 | 172 | @param repr the json string to parse 173 | @param error used to return an error by reference (pass NULL if this is not desired) 174 | */ 175 | - (id)objectWithString:(NSString*)repr error:(NSError**)error { 176 | return [self objectWithString:repr 177 | allowScalar:NO 178 | error:error]; 179 | } 180 | 181 | 182 | 183 | #pragma mark Properties - parsing 184 | 185 | - (NSUInteger)maxDepth { 186 | return jsonParser.maxDepth; 187 | } 188 | 189 | - (void)setMaxDepth:(NSUInteger)d { 190 | jsonWriter.maxDepth = jsonParser.maxDepth = d; 191 | } 192 | 193 | 194 | #pragma mark Properties - writing 195 | 196 | - (BOOL)humanReadable { 197 | return jsonWriter.humanReadable; 198 | } 199 | 200 | - (void)setHumanReadable:(BOOL)x { 201 | jsonWriter.humanReadable = x; 202 | } 203 | 204 | - (BOOL)sortKeys { 205 | return jsonWriter.sortKeys; 206 | } 207 | 208 | - (void)setSortKeys:(BOOL)x { 209 | jsonWriter.sortKeys = x; 210 | } 211 | 212 | @end 213 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/SBJsonBase.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | 32 | extern NSString * SBJSONErrorDomain; 33 | 34 | 35 | enum { 36 | EUNSUPPORTED = 1, 37 | EPARSENUM, 38 | EPARSE, 39 | EFRAGMENT, 40 | ECTRL, 41 | EUNICODE, 42 | EDEPTH, 43 | EESCAPE, 44 | ETRAILCOMMA, 45 | ETRAILGARBAGE, 46 | EEOF, 47 | EINPUT 48 | }; 49 | 50 | /** 51 | @brief Common base class for parsing & writing. 52 | 53 | This class contains the common error-handling code and option between the parser/writer. 54 | */ 55 | @interface SBJsonBase : NSObject { 56 | NSMutableArray *errorTrace; 57 | 58 | @protected 59 | NSUInteger depth, maxDepth; 60 | } 61 | 62 | /** 63 | @brief The maximum recursing depth. 64 | 65 | Defaults to 512. If the input is nested deeper than this the input will be deemed to be 66 | malicious and the parser returns nil, signalling an error. ("Nested too deep".) You can 67 | turn off this security feature by setting the maxDepth value to 0. 68 | */ 69 | @property NSUInteger maxDepth; 70 | 71 | /** 72 | @brief Return an error trace, or nil if there was no errors. 73 | 74 | Note that this method returns the trace of the last method that failed. 75 | You need to check the return value of the call you're making to figure out 76 | if the call actually failed, before you know call this method. 77 | */ 78 | @property(copy,readonly) NSArray* errorTrace; 79 | 80 | /// @internal for use in subclasses to add errors to the stack trace 81 | - (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str; 82 | 83 | /// @internal for use in subclasess to clear the error before a new parsing attempt 84 | - (void)clearErrorTrace; 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/SBJsonBase.m.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "SBJsonBase.h" 31 | NSString * SBJSONErrorDomain = @"org.brautaset.JSON.ErrorDomain"; 32 | 33 | 34 | @implementation SBJsonBase 35 | 36 | @synthesize errorTrace; 37 | @synthesize maxDepth; 38 | 39 | - (id)init { 40 | self = [super init]; 41 | if (self) 42 | self.maxDepth = 512; 43 | return self; 44 | } 45 | 46 | - (void)dealloc { 47 | [errorTrace release]; 48 | [super dealloc]; 49 | } 50 | 51 | - (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str { 52 | NSDictionary *userInfo; 53 | if (!errorTrace) { 54 | errorTrace = [NSMutableArray new]; 55 | userInfo = [NSDictionary dictionaryWithObject:str forKey:NSLocalizedDescriptionKey]; 56 | 57 | } else { 58 | userInfo = [NSDictionary dictionaryWithObjectsAndKeys: 59 | str, NSLocalizedDescriptionKey, 60 | [errorTrace lastObject], NSUnderlyingErrorKey, 61 | nil]; 62 | } 63 | 64 | NSError *error = [NSError errorWithDomain:SBJSONErrorDomain code:code userInfo:userInfo]; 65 | 66 | [self willChangeValueForKey:@"errorTrace"]; 67 | [errorTrace addObject:error]; 68 | [self didChangeValueForKey:@"errorTrace"]; 69 | } 70 | 71 | - (void)clearErrorTrace { 72 | [self willChangeValueForKey:@"errorTrace"]; 73 | [errorTrace release]; 74 | errorTrace = nil; 75 | [self didChangeValueForKey:@"errorTrace"]; 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/SBJsonParser.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | #import "SBJsonBase.h" 32 | 33 | /** 34 | @brief Options for the parser class. 35 | 36 | This exists so the SBJSON facade can implement the options in the parser without having to re-declare them. 37 | */ 38 | @protocol SBJsonParser 39 | 40 | /** 41 | @brief Return the object represented by the given string. 42 | 43 | Returns the object represented by the passed-in string or nil on error. The returned object can be 44 | a string, number, boolean, null, array or dictionary. 45 | 46 | @param repr the json string to parse 47 | */ 48 | - (id)objectWithString:(NSString *)repr; 49 | 50 | @end 51 | 52 | 53 | /** 54 | @brief The JSON parser class. 55 | 56 | JSON is mapped to Objective-C types in the following way: 57 | 58 | @li Null -> NSNull 59 | @li String -> NSMutableString 60 | @li Array -> NSMutableArray 61 | @li Object -> NSMutableDictionary 62 | @li Boolean -> NSNumber (initialised with -initWithBool:) 63 | @li Number -> NSDecimalNumber 64 | 65 | Since Objective-C doesn't have a dedicated class for boolean values, these turns into NSNumber 66 | instances. These are initialised with the -initWithBool: method, and 67 | round-trip back to JSON properly. (They won't silently suddenly become 0 or 1; they'll be 68 | represented as 'true' and 'false' again.) 69 | 70 | JSON numbers turn into NSDecimalNumber instances, 71 | as we can thus avoid any loss of precision. (JSON allows ridiculously large numbers.) 72 | 73 | */ 74 | @interface SBJsonParser : SBJsonBase { 75 | 76 | @private 77 | const char *c; 78 | } 79 | 80 | @end 81 | 82 | // don't use - exists for backwards compatibility with 2.1.x only. Will be removed in 2.3. 83 | @interface SBJsonParser (Private) 84 | - (id)fragmentWithString:(id)repr; 85 | @end 86 | 87 | 88 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/.svn/text-base/SBJsonWriter.h.svn-base: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | #import "SBJsonBase.h" 32 | 33 | /** 34 | @brief Options for the writer class. 35 | 36 | This exists so the SBJSON facade can implement the options in the writer without having to re-declare them. 37 | */ 38 | @protocol SBJsonWriter 39 | 40 | /** 41 | @brief Whether we are generating human-readable (multiline) JSON. 42 | 43 | Set whether or not to generate human-readable JSON. The default is NO, which produces 44 | JSON without any whitespace. (Except inside strings.) If set to YES, generates human-readable 45 | JSON with linebreaks after each array value and dictionary key/value pair, indented two 46 | spaces per nesting level. 47 | */ 48 | @property BOOL humanReadable; 49 | 50 | /** 51 | @brief Whether or not to sort the dictionary keys in the output. 52 | 53 | If this is set to YES, the dictionary keys in the JSON output will be in sorted order. 54 | (This is useful if you need to compare two structures, for example.) The default is NO. 55 | */ 56 | @property BOOL sortKeys; 57 | 58 | /** 59 | @brief Return JSON representation (or fragment) for the given object. 60 | 61 | Returns a string containing JSON representation of the passed in value, or nil on error. 62 | If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. 63 | 64 | @param value any instance that can be represented as a JSON fragment 65 | 66 | */ 67 | - (NSString*)stringWithObject:(id)value; 68 | 69 | @end 70 | 71 | 72 | /** 73 | @brief The JSON writer class. 74 | 75 | Objective-C types are mapped to JSON types in the following way: 76 | 77 | @li NSNull -> Null 78 | @li NSString -> String 79 | @li NSArray -> Array 80 | @li NSDictionary -> Object 81 | @li NSNumber (-initWithBool:) -> Boolean 82 | @li NSNumber -> Number 83 | 84 | In JSON the keys of an object must be strings. NSDictionary keys need 85 | not be, but attempting to convert an NSDictionary with non-string keys 86 | into JSON will throw an exception. 87 | 88 | NSNumber instances created with the +initWithBool: method are 89 | converted into the JSON boolean "true" and "false" values, and vice 90 | versa. Any other NSNumber instances are converted to a JSON number the 91 | way you would expect. 92 | 93 | */ 94 | @interface SBJsonWriter : SBJsonBase { 95 | 96 | @private 97 | BOOL sortKeys, humanReadable; 98 | } 99 | 100 | @end 101 | 102 | // don't use - exists for backwards compatibility. Will be removed in 2.3. 103 | @interface SBJsonWriter (Private) 104 | - (NSString*)stringWithFragment:(id)value; 105 | @end 106 | 107 | /** 108 | @brief Allows generation of JSON for otherwise unsupported classes. 109 | 110 | If you have a custom class that you want to create a JSON representation for you can implement 111 | this method in your class. It should return a representation of your object defined 112 | in terms of objects that can be translated into JSON. For example, a Person 113 | object might implement it like this: 114 | 115 | @code 116 | - (id)jsonProxyObject { 117 | return [NSDictionary dictionaryWithObjectsAndKeys: 118 | name, @"name", 119 | phone, @"phone", 120 | email, @"email", 121 | nil]; 122 | } 123 | @endcode 124 | 125 | */ 126 | @interface NSObject (SBProxyForJson) 127 | - (id)proxyForJson; 128 | @end 129 | 130 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/JSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | /** 31 | @mainpage A strict JSON parser and generator for Objective-C 32 | 33 | JSON (JavaScript Object Notation) is a lightweight data-interchange 34 | format. This framework provides two apis for parsing and generating 35 | JSON. One standard object-based and a higher level api consisting of 36 | categories added to existing Objective-C classes. 37 | 38 | Learn more on the http://code.google.com/p/json-framework project site. 39 | 40 | This framework does its best to be as strict as possible, both in what it 41 | accepts and what it generates. For example, it does not support trailing commas 42 | in arrays or objects. Nor does it support embedded comments, or 43 | anything else not in the JSON specification. This is considered a feature. 44 | 45 | */ 46 | 47 | #import "SBJSON.h" 48 | #import "NSObject+SBJSON.h" 49 | #import "NSString+SBJSON.h" 50 | 51 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/NSObject+SBJSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | 32 | 33 | /** 34 | @brief Adds JSON generation to Foundation classes 35 | 36 | This is a category on NSObject that adds methods for returning JSON representations 37 | of standard objects to the objects themselves. This means you can call the 38 | -JSONRepresentation method on an NSArray object and it'll do what you want. 39 | */ 40 | @interface NSObject (NSObject_SBJSON) 41 | 42 | /** 43 | @brief Returns a string containing the receiver encoded as a JSON fragment. 44 | 45 | This method is added as a category on NSObject but is only actually 46 | supported for the following objects: 47 | @li NSDictionary 48 | @li NSArray 49 | @li NSString 50 | @li NSNumber (also used for booleans) 51 | @li NSNull 52 | 53 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 54 | */ 55 | - (NSString *)JSONFragment; 56 | 57 | /** 58 | @brief Returns a string containing the receiver encoded in JSON. 59 | 60 | This method is added as a category on NSObject but is only actually 61 | supported for the following objects: 62 | @li NSDictionary 63 | @li NSArray 64 | */ 65 | - (NSString *)JSONRepresentation; 66 | 67 | @end 68 | 69 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/NSObject+SBJSON.m: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "NSObject+SBJSON.h" 31 | #import "SBJsonWriter.h" 32 | 33 | @implementation NSObject (NSObject_SBJSON) 34 | 35 | - (NSString *)JSONFragment { 36 | SBJsonWriter *jsonWriter = [SBJsonWriter new]; 37 | NSString *json = [jsonWriter stringWithFragment:self]; 38 | if (!json) 39 | //NSLog(@"-JSONFragment failed. Error trace is: %@", [jsonWriter errorTrace]); 40 | [jsonWriter release]; 41 | return json; 42 | } 43 | 44 | - (NSString *)JSONRepresentation { 45 | SBJsonWriter *jsonWriter = [SBJsonWriter new]; 46 | NSString *json = [jsonWriter stringWithObject:self]; 47 | if (!json) 48 | // NSLog(@"-JSONRepresentation failed. Error trace is: %@", [jsonWriter errorTrace]); 49 | [jsonWriter release]; 50 | return json; 51 | } 52 | 53 | @end 54 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/NSString+SBJSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | 32 | /** 33 | @brief Adds JSON parsing methods to NSString 34 | 35 | This is a category on NSString that adds methods for parsing the target string. 36 | */ 37 | @interface NSString (NSString_SBJSON) 38 | 39 | 40 | /** 41 | @brief Returns the object represented in the receiver, or nil on error. 42 | 43 | Returns a a scalar object represented by the string's JSON fragment representation. 44 | 45 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 46 | */ 47 | - (id)JSONFragmentValue; 48 | 49 | /** 50 | @brief Returns the NSDictionary or NSArray represented by the current string's JSON representation. 51 | 52 | Returns the dictionary or array represented in the receiver, or nil on error. 53 | 54 | Returns the NSDictionary or NSArray represented by the current string's JSON representation. 55 | */ 56 | - (id)JSONValue; 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/NSString+SBJSON.m: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007-2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "NSString+SBJSON.h" 31 | #import "SBJsonParser.h" 32 | 33 | @implementation NSString (NSString_SBJSON) 34 | 35 | - (id)JSONFragmentValue 36 | { 37 | SBJsonParser *jsonParser = [SBJsonParser new]; 38 | id repr = [jsonParser fragmentWithString:self]; 39 | if (!repr) 40 | //NSLog(@"-JSONFragmentValue failed. Error trace is: %@", [jsonParser errorTrace]); 41 | [jsonParser release]; 42 | return repr; 43 | } 44 | 45 | - (id)JSONValue 46 | { 47 | SBJsonParser *jsonParser = [SBJsonParser new]; 48 | id repr = [jsonParser objectWithString:self]; 49 | if (!repr) 50 | //NSLog(@"-JSONValue failed. Error trace is: %@", [jsonParser errorTrace]); 51 | [jsonParser release]; 52 | return repr; 53 | } 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/SBJSON.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007-2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | #import "SBJsonParser.h" 32 | #import "SBJsonWriter.h" 33 | 34 | /** 35 | @brief Facade for SBJsonWriter/SBJsonParser. 36 | 37 | Requests are forwarded to instances of SBJsonWriter and SBJsonParser. 38 | */ 39 | @interface SBJSON : SBJsonBase { 40 | 41 | @private 42 | SBJsonParser *jsonParser; 43 | SBJsonWriter *jsonWriter; 44 | } 45 | 46 | 47 | /// Return the fragment represented by the given string 48 | - (id)fragmentWithString:(NSString*)jsonrep 49 | error:(NSError**)error; 50 | 51 | /// Return the object represented by the given string 52 | - (id)objectWithString:(NSString*)jsonrep 53 | error:(NSError**)error; 54 | 55 | /// Parse the string and return the represented object (or scalar) 56 | - (id)objectWithString:(id)value 57 | allowScalar:(BOOL)x 58 | error:(NSError**)error; 59 | 60 | 61 | /// Return JSON representation of an array or dictionary 62 | - (NSString*)stringWithObject:(id)value 63 | error:(NSError**)error; 64 | 65 | /// Return JSON representation of any legal JSON value 66 | - (NSString*)stringWithFragment:(id)value 67 | error:(NSError**)error; 68 | 69 | /// Return JSON representation (or fragment) for the given object 70 | - (NSString*)stringWithObject:(id)value 71 | allowScalar:(BOOL)x 72 | error:(NSError**)error; 73 | 74 | 75 | @end 76 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/SBJSON.m: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2007-2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "SBJSON.h" 31 | 32 | @implementation SBJSON 33 | 34 | - (id)init { 35 | self = [super init]; 36 | if (self) { 37 | jsonWriter = [SBJsonWriter new]; 38 | jsonParser = [SBJsonParser new]; 39 | [self setMaxDepth:512]; 40 | 41 | } 42 | return self; 43 | } 44 | 45 | - (void)dealloc { 46 | [jsonWriter release]; 47 | [jsonParser release]; 48 | [super dealloc]; 49 | } 50 | 51 | #pragma mark Writer 52 | 53 | 54 | - (NSString *)stringWithObject:(id)obj { 55 | NSString *repr = [jsonWriter stringWithObject:obj]; 56 | if (repr) 57 | return repr; 58 | 59 | [errorTrace release]; 60 | errorTrace = [[jsonWriter errorTrace] mutableCopy]; 61 | return nil; 62 | } 63 | 64 | /** 65 | Returns a string containing JSON representation of the passed in value, or nil on error. 66 | If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. 67 | 68 | @param value any instance that can be represented as a JSON fragment 69 | @param allowScalar wether to return json fragments for scalar objects 70 | @param error used to return an error by reference (pass NULL if this is not desired) 71 | 72 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 73 | */ 74 | - (NSString*)stringWithObject:(id)value allowScalar:(BOOL)allowScalar error:(NSError**)error { 75 | 76 | NSString *json = allowScalar ? [jsonWriter stringWithFragment:value] : [jsonWriter stringWithObject:value]; 77 | if (json) 78 | return json; 79 | 80 | [errorTrace release]; 81 | errorTrace = [[jsonWriter errorTrace] mutableCopy]; 82 | 83 | if (error) 84 | *error = [errorTrace lastObject]; 85 | return nil; 86 | } 87 | 88 | /** 89 | Returns a string containing JSON representation of the passed in value, or nil on error. 90 | If nil is returned and @p error is not NULL, @p error can be interrogated to find the cause of the error. 91 | 92 | @param value any instance that can be represented as a JSON fragment 93 | @param error used to return an error by reference (pass NULL if this is not desired) 94 | 95 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 96 | */ 97 | - (NSString*)stringWithFragment:(id)value error:(NSError**)error { 98 | return [self stringWithObject:value 99 | allowScalar:YES 100 | error:error]; 101 | } 102 | 103 | /** 104 | Returns a string containing JSON representation of the passed in value, or nil on error. 105 | If nil is returned and @p error is not NULL, @p error can be interrogated to find the cause of the error. 106 | 107 | @param value a NSDictionary or NSArray instance 108 | @param error used to return an error by reference (pass NULL if this is not desired) 109 | */ 110 | - (NSString*)stringWithObject:(id)value error:(NSError**)error { 111 | return [self stringWithObject:value 112 | allowScalar:NO 113 | error:error]; 114 | } 115 | 116 | #pragma mark Parsing 117 | 118 | - (id)objectWithString:(NSString *)repr { 119 | id obj = [jsonParser objectWithString:repr]; 120 | if (obj) 121 | return obj; 122 | 123 | [errorTrace release]; 124 | errorTrace = [[jsonParser errorTrace] mutableCopy]; 125 | 126 | return nil; 127 | } 128 | 129 | /** 130 | Returns the object represented by the passed-in string or nil on error. The returned object can be 131 | a string, number, boolean, null, array or dictionary. 132 | 133 | @param value the json string to parse 134 | @param allowScalar whether to return objects for JSON fragments 135 | @param error used to return an error by reference (pass NULL if this is not desired) 136 | 137 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 138 | */ 139 | - (id)objectWithString:(id)value allowScalar:(BOOL)allowScalar error:(NSError**)error { 140 | 141 | id obj = allowScalar ? [jsonParser fragmentWithString:value] : [jsonParser objectWithString:value]; 142 | if (obj) 143 | return obj; 144 | 145 | [errorTrace release]; 146 | errorTrace = [[jsonParser errorTrace] mutableCopy]; 147 | 148 | if (error) 149 | *error = [errorTrace lastObject]; 150 | return nil; 151 | } 152 | 153 | /** 154 | Returns the object represented by the passed-in string or nil on error. The returned object can be 155 | a string, number, boolean, null, array or dictionary. 156 | 157 | @param repr the json string to parse 158 | @param error used to return an error by reference (pass NULL if this is not desired) 159 | 160 | @deprecated Given we bill ourselves as a "strict" JSON library, this method should be removed. 161 | */ 162 | - (id)fragmentWithString:(NSString*)repr error:(NSError**)error { 163 | return [self objectWithString:repr 164 | allowScalar:YES 165 | error:error]; 166 | } 167 | 168 | /** 169 | Returns the object represented by the passed-in string or nil on error. The returned object 170 | will be either a dictionary or an array. 171 | 172 | @param repr the json string to parse 173 | @param error used to return an error by reference (pass NULL if this is not desired) 174 | */ 175 | - (id)objectWithString:(NSString*)repr error:(NSError**)error { 176 | return [self objectWithString:repr 177 | allowScalar:NO 178 | error:error]; 179 | } 180 | 181 | 182 | 183 | #pragma mark Properties - parsing 184 | 185 | - (NSUInteger)maxDepth { 186 | return jsonParser.maxDepth; 187 | } 188 | 189 | - (void)setMaxDepth:(NSUInteger)d { 190 | jsonWriter.maxDepth = jsonParser.maxDepth = d; 191 | } 192 | 193 | 194 | #pragma mark Properties - writing 195 | 196 | - (BOOL)humanReadable { 197 | return jsonWriter.humanReadable; 198 | } 199 | 200 | - (void)setHumanReadable:(BOOL)x { 201 | jsonWriter.humanReadable = x; 202 | } 203 | 204 | - (BOOL)sortKeys { 205 | return jsonWriter.sortKeys; 206 | } 207 | 208 | - (void)setSortKeys:(BOOL)x { 209 | jsonWriter.sortKeys = x; 210 | } 211 | 212 | @end 213 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/SBJsonBase.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | 32 | extern NSString * SBJSONErrorDomain; 33 | 34 | 35 | enum { 36 | EUNSUPPORTED = 1, 37 | EPARSENUM, 38 | EPARSE, 39 | EFRAGMENT, 40 | ECTRL, 41 | EUNICODE, 42 | EDEPTH, 43 | EESCAPE, 44 | ETRAILCOMMA, 45 | ETRAILGARBAGE, 46 | EEOF, 47 | EINPUT 48 | }; 49 | 50 | /** 51 | @brief Common base class for parsing & writing. 52 | 53 | This class contains the common error-handling code and option between the parser/writer. 54 | */ 55 | @interface SBJsonBase : NSObject { 56 | NSMutableArray *errorTrace; 57 | 58 | @protected 59 | NSUInteger depth, maxDepth; 60 | } 61 | 62 | /** 63 | @brief The maximum recursing depth. 64 | 65 | Defaults to 512. If the input is nested deeper than this the input will be deemed to be 66 | malicious and the parser returns nil, signalling an error. ("Nested too deep".) You can 67 | turn off this security feature by setting the maxDepth value to 0. 68 | */ 69 | @property NSUInteger maxDepth; 70 | 71 | /** 72 | @brief Return an error trace, or nil if there was no errors. 73 | 74 | Note that this method returns the trace of the last method that failed. 75 | You need to check the return value of the call you're making to figure out 76 | if the call actually failed, before you know call this method. 77 | */ 78 | @property(copy,readonly) NSArray* errorTrace; 79 | 80 | /// @internal for use in subclasses to add errors to the stack trace 81 | - (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str; 82 | 83 | /// @internal for use in subclasess to clear the error before a new parsing attempt 84 | - (void)clearErrorTrace; 85 | 86 | @end 87 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/SBJsonBase.m: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import "SBJsonBase.h" 31 | NSString * SBJSONErrorDomain = @"org.brautaset.JSON.ErrorDomain"; 32 | 33 | 34 | @implementation SBJsonBase 35 | 36 | @synthesize errorTrace; 37 | @synthesize maxDepth; 38 | 39 | - (id)init { 40 | self = [super init]; 41 | if (self) 42 | self.maxDepth = 512; 43 | return self; 44 | } 45 | 46 | - (void)dealloc { 47 | [errorTrace release]; 48 | [super dealloc]; 49 | } 50 | 51 | - (void)addErrorWithCode:(NSUInteger)code description:(NSString*)str { 52 | NSDictionary *userInfo; 53 | if (!errorTrace) { 54 | errorTrace = [NSMutableArray new]; 55 | userInfo = [NSDictionary dictionaryWithObject:str forKey:NSLocalizedDescriptionKey]; 56 | 57 | } else { 58 | userInfo = [NSDictionary dictionaryWithObjectsAndKeys: 59 | str, NSLocalizedDescriptionKey, 60 | [errorTrace lastObject], NSUnderlyingErrorKey, 61 | nil]; 62 | } 63 | 64 | NSError *error = [NSError errorWithDomain:SBJSONErrorDomain code:code userInfo:userInfo]; 65 | 66 | [self willChangeValueForKey:@"errorTrace"]; 67 | [errorTrace addObject:error]; 68 | [self didChangeValueForKey:@"errorTrace"]; 69 | } 70 | 71 | - (void)clearErrorTrace { 72 | [self willChangeValueForKey:@"errorTrace"]; 73 | [errorTrace release]; 74 | errorTrace = nil; 75 | [self didChangeValueForKey:@"errorTrace"]; 76 | } 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/SBJsonParser.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | #import "SBJsonBase.h" 32 | 33 | /** 34 | @brief Options for the parser class. 35 | 36 | This exists so the SBJSON facade can implement the options in the parser without having to re-declare them. 37 | */ 38 | @protocol SBJsonParser 39 | 40 | /** 41 | @brief Return the object represented by the given string. 42 | 43 | Returns the object represented by the passed-in string or nil on error. The returned object can be 44 | a string, number, boolean, null, array or dictionary. 45 | 46 | @param repr the json string to parse 47 | */ 48 | - (id)objectWithString:(NSString *)repr; 49 | 50 | @end 51 | 52 | 53 | /** 54 | @brief The JSON parser class. 55 | 56 | JSON is mapped to Objective-C types in the following way: 57 | 58 | @li Null -> NSNull 59 | @li String -> NSMutableString 60 | @li Array -> NSMutableArray 61 | @li Object -> NSMutableDictionary 62 | @li Boolean -> NSNumber (initialised with -initWithBool:) 63 | @li Number -> NSDecimalNumber 64 | 65 | Since Objective-C doesn't have a dedicated class for boolean values, these turns into NSNumber 66 | instances. These are initialised with the -initWithBool: method, and 67 | round-trip back to JSON properly. (They won't silently suddenly become 0 or 1; they'll be 68 | represented as 'true' and 'false' again.) 69 | 70 | JSON numbers turn into NSDecimalNumber instances, 71 | as we can thus avoid any loss of precision. (JSON allows ridiculously large numbers.) 72 | 73 | */ 74 | @interface SBJsonParser : SBJsonBase { 75 | 76 | @private 77 | const char *c; 78 | } 79 | 80 | @end 81 | 82 | // don't use - exists for backwards compatibility with 2.1.x only. Will be removed in 2.3. 83 | @interface SBJsonParser (Private) 84 | - (id)fragmentWithString:(id)repr; 85 | @end 86 | 87 | 88 | -------------------------------------------------------------------------------- /Facebook Demo/External Frameworks/JSON/SBJsonWriter.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2009 Stig Brautaset. All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the author nor the names of its contributors may be used 15 | to endorse or promote products derived from this software without specific 16 | prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | */ 29 | 30 | #import 31 | #import "SBJsonBase.h" 32 | 33 | /** 34 | @brief Options for the writer class. 35 | 36 | This exists so the SBJSON facade can implement the options in the writer without having to re-declare them. 37 | */ 38 | @protocol SBJsonWriter 39 | 40 | /** 41 | @brief Whether we are generating human-readable (multiline) JSON. 42 | 43 | Set whether or not to generate human-readable JSON. The default is NO, which produces 44 | JSON without any whitespace. (Except inside strings.) If set to YES, generates human-readable 45 | JSON with linebreaks after each array value and dictionary key/value pair, indented two 46 | spaces per nesting level. 47 | */ 48 | @property BOOL humanReadable; 49 | 50 | /** 51 | @brief Whether or not to sort the dictionary keys in the output. 52 | 53 | If this is set to YES, the dictionary keys in the JSON output will be in sorted order. 54 | (This is useful if you need to compare two structures, for example.) The default is NO. 55 | */ 56 | @property BOOL sortKeys; 57 | 58 | /** 59 | @brief Return JSON representation (or fragment) for the given object. 60 | 61 | Returns a string containing JSON representation of the passed in value, or nil on error. 62 | If nil is returned and @p error is not NULL, @p *error can be interrogated to find the cause of the error. 63 | 64 | @param value any instance that can be represented as a JSON fragment 65 | 66 | */ 67 | - (NSString*)stringWithObject:(id)value; 68 | 69 | @end 70 | 71 | 72 | /** 73 | @brief The JSON writer class. 74 | 75 | Objective-C types are mapped to JSON types in the following way: 76 | 77 | @li NSNull -> Null 78 | @li NSString -> String 79 | @li NSArray -> Array 80 | @li NSDictionary -> Object 81 | @li NSNumber (-initWithBool:) -> Boolean 82 | @li NSNumber -> Number 83 | 84 | In JSON the keys of an object must be strings. NSDictionary keys need 85 | not be, but attempting to convert an NSDictionary with non-string keys 86 | into JSON will throw an exception. 87 | 88 | NSNumber instances created with the +initWithBool: method are 89 | converted into the JSON boolean "true" and "false" values, and vice 90 | versa. Any other NSNumber instances are converted to a JSON number the 91 | way you would expect. 92 | 93 | */ 94 | @interface SBJsonWriter : SBJsonBase { 95 | 96 | @private 97 | BOOL sortKeys, humanReadable; 98 | } 99 | 100 | @end 101 | 102 | // don't use - exists for backwards compatibility. Will be removed in 2.3. 103 | @interface SBJsonWriter (Private) 104 | - (NSString*)stringWithFragment:(id)value; 105 | @end 106 | 107 | /** 108 | @brief Allows generation of JSON for otherwise unsupported classes. 109 | 110 | If you have a custom class that you want to create a JSON representation for you can implement 111 | this method in your class. It should return a representation of your object defined 112 | in terms of objects that can be translated into JSON. For example, a Person 113 | object might implement it like this: 114 | 115 | @code 116 | - (id)jsonProxyObject { 117 | return [NSDictionary dictionaryWithObjectsAndKeys: 118 | name, @"name", 119 | phone, @"phone", 120 | email, @"email", 121 | nil]; 122 | } 123 | @endcode 124 | 125 | */ 126 | @interface NSObject (SBProxyForJson) 127 | - (id)proxyForJson; 128 | @end 129 | 130 | -------------------------------------------------------------------------------- /Facebook Demo/Facebook_Demo-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIconFile 12 | 13 | CFBundleIdentifier 14 | com.yourcompany.${PRODUCT_NAME:rfc1034identifier} 15 | CFBundleInfoDictionaryVersion 16 | 6.0 17 | CFBundleName 18 | ${PRODUCT_NAME} 19 | CFBundlePackageType 20 | APPL 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | NSMainNibFile 28 | MainWindow 29 | 30 | 31 | -------------------------------------------------------------------------------- /Facebook Demo/Facebook_Demo_Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'Facebook Demo' target in the 'Facebook Demo' project 3 | // 4 | #import 5 | 6 | #ifndef __IPHONE_3_0 7 | #warning "This project uses features only available in iPhone SDK 3.0 and later." 8 | #endif 9 | 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /Facebook Demo/IFNNotificationDisplay.h: -------------------------------------------------------------------------------- 1 | // 2 | // IFNNotificationDisplay.h 3 | // iFlashCardPro 4 | // 5 | // Created by Andy Yanok on 2/19/11. 6 | // Copyright 2011 Andrew Yanok. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | #import 12 | 13 | #define NOTIFICATION_DISPLAY_TAG 100 14 | 15 | typedef enum { 16 | NotificationDisplayTypeText = 0, 17 | NotificationDisplayTypeLoading = 1 18 | } NotificationDisplayType; 19 | 20 | @interface IFNNotificationDisplay : UIView { 21 | UILabel *lblDisplay; 22 | UIActivityIndicatorView *activity; 23 | NotificationDisplayType type; 24 | } 25 | 26 | @property (nonatomic, assign) NotificationDisplayType type; 27 | 28 | - (id) init; 29 | - (void) setNotificationText:(NSString*) _text; 30 | - (void) displayInView:(UIView*) _view atCenter:(CGPoint) _center withInterval:(float) _interval; 31 | - (void) removeNotification; 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /Facebook Demo/IFNNotificationDisplay.m: -------------------------------------------------------------------------------- 1 | // 2 | // IFNNotificationDisplay.m 3 | // iFlashCardPro 4 | // 5 | // Created by Andy Yanok on 2/19/11. 6 | // Copyright 2011 Andrew Yanok. All rights reserved. 7 | // 8 | 9 | #import "IFNNotificationDisplay.h" 10 | 11 | 12 | @implementation IFNNotificationDisplay 13 | @synthesize type; 14 | 15 | - (id) init { 16 | self = [super initWithFrame:CGRectMake(0.0, 0.0, 100.0, 100.0)]; 17 | if (self) { 18 | 19 | self.backgroundColor = [UIColor colorWithWhite:0.0 alpha:.7]; 20 | self.layer.cornerRadius = 5.0; 21 | 22 | lblDisplay = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0, 100.0, 100.0)]; 23 | lblDisplay.backgroundColor = [UIColor clearColor]; 24 | lblDisplay.textColor = [UIColor whiteColor]; 25 | lblDisplay.font = [UIFont fontWithName:@"Helvetica-Bold" size:15.0]; 26 | lblDisplay.textAlignment = UITextAlignmentCenter; 27 | lblDisplay.adjustsFontSizeToFitWidth = YES; 28 | [self addSubview:lblDisplay]; 29 | 30 | activity = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhite]; 31 | activity.hidesWhenStopped = YES; 32 | activity.center = self.center; 33 | [self addSubview:activity]; 34 | } 35 | 36 | return self; 37 | } 38 | 39 | - (void) setNotificationText:(NSString*) _text { 40 | lblDisplay.text = _text; 41 | } 42 | 43 | - (void) displayInView:(UIView*) _view atCenter:(CGPoint) _center withInterval:(float) _interval { 44 | self.center = _center; 45 | [_view addSubview:self]; 46 | 47 | if (type == NotificationDisplayTypeText) { 48 | [self performSelector:@selector(removeNotification) withObject:nil afterDelay:_interval]; 49 | } else { //loading 50 | lblDisplay.frame = CGRectMake(0.0, 80.0, self.bounds.size.width, 20.0); 51 | if ([lblDisplay.text length] == 0) 52 | lblDisplay.text = @"Loading..."; 53 | [activity startAnimating]; 54 | } 55 | 56 | } 57 | 58 | - (void) removeNotification { 59 | CATransition *animation = [CATransition animation]; 60 | [animation setType:kCATransitionFade]; 61 | [animation setSubtype:kCATransitionFromRight]; 62 | [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]]; 63 | [self.layer addAnimation:animation forKey:@"EaseOut"]; 64 | self.hidden = YES; 65 | 66 | [self performSelector:@selector(removeFromSuperview) withObject:nil afterDelay:.5]; 67 | } 68 | 69 | 70 | 71 | - (void)dealloc { 72 | [activity release]; 73 | [lblDisplay release]; 74 | [super dealloc]; 75 | } 76 | 77 | 78 | @end 79 | -------------------------------------------------------------------------------- /Facebook Demo/PostLinkViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // PostLinkViewController.h 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/6/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "FBFeedPost.h" 11 | #import "IFNNotificationDisplay.h" 12 | 13 | @interface PostLinkViewController : UIViewController { 14 | IBOutlet UITextField *txtLink; 15 | IBOutlet UITextView *txtCaption; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UITextField *txtLink; 19 | @property (nonatomic, retain) IBOutlet UITextView *txtCaption; 20 | 21 | - (IBAction) btnPostPress:(id) sender; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Facebook Demo/PostLinkViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // PostLinkViewController.m 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/6/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "PostLinkViewController.h" 10 | 11 | 12 | @implementation PostLinkViewController 13 | @synthesize txtLink, txtCaption; 14 | 15 | - (IBAction) btnPostPress:(id) sender { 16 | 17 | [self.txtLink resignFirstResponder]; 18 | [self.txtCaption resignFirstResponder]; 19 | 20 | //we will release this object when it is finished posting 21 | FBFeedPost *post = [[FBFeedPost alloc] initWithLinkPath:self.txtLink.text caption:self.txtCaption.text]; 22 | [post publishPostWithDelegate:self]; 23 | 24 | IFNNotificationDisplay *display = [[IFNNotificationDisplay alloc] init]; 25 | display.type = NotificationDisplayTypeLoading; 26 | display.tag = NOTIFICATION_DISPLAY_TAG; 27 | [display setNotificationText:@"Posting Link..."]; 28 | [display displayInView:self.view atCenter:CGPointMake(self.view.center.x, self.view.center.y-100.0) withInterval:0.0]; 29 | [display release]; 30 | } 31 | 32 | #pragma mark - 33 | #pragma mark FBFeedPostDelegate 34 | 35 | - (void) failedToPublishPost:(FBFeedPost*) _post { 36 | 37 | UIView *dv = [self.view viewWithTag:NOTIFICATION_DISPLAY_TAG]; 38 | [dv removeFromSuperview]; 39 | 40 | IFNNotificationDisplay *display = [[IFNNotificationDisplay alloc] init]; 41 | display.type = NotificationDisplayTypeText; 42 | [display setNotificationText:@"Failed To Post"]; 43 | [display displayInView:self.view atCenter:CGPointMake(self.view.center.x, self.view.center.y-100.0) withInterval:1.5]; 44 | [display release]; 45 | 46 | //release the alloc'd post 47 | [_post release]; 48 | } 49 | 50 | - (void) finishedPublishingPost:(FBFeedPost*) _post { 51 | 52 | UIView *dv = [self.view viewWithTag:NOTIFICATION_DISPLAY_TAG]; 53 | [dv removeFromSuperview]; 54 | 55 | IFNNotificationDisplay *display = [[IFNNotificationDisplay alloc] init]; 56 | display.type = NotificationDisplayTypeText; 57 | [display setNotificationText:@"Finished Posting"]; 58 | [display displayInView:self.view atCenter:CGPointMake(self.view.center.x, self.view.center.y-100.0) withInterval:1.5]; 59 | [display release]; 60 | 61 | //release the alloc'd post 62 | [_post release]; 63 | } 64 | 65 | #pragma mark - 66 | #pragma mark LoadView 67 | 68 | - (void)viewDidLoad { 69 | [super viewDidLoad]; 70 | 71 | self.title = @"Post A Link"; 72 | 73 | UIBarButtonItem *btnPost = [[UIBarButtonItem alloc] initWithTitle:@"Post" style:UIBarButtonItemStyleBordered 74 | target:self action:@selector(btnPostPress:)]; 75 | self.navigationItem.rightBarButtonItem = btnPost; 76 | [btnPost release]; 77 | } 78 | 79 | 80 | - (void)didReceiveMemoryWarning { 81 | // Releases the view if it doesn't have a superview. 82 | [super didReceiveMemoryWarning]; 83 | 84 | // Release any cached data, images, etc. that aren't in use. 85 | } 86 | 87 | - (void)viewDidUnload { 88 | [super viewDidUnload]; 89 | // Release any retained subviews of the main view. 90 | // e.g. self.myOutlet = nil; 91 | } 92 | 93 | 94 | - (void)dealloc { 95 | [txtLink release]; 96 | [txtCaption release]; 97 | [super dealloc]; 98 | } 99 | 100 | 101 | @end 102 | -------------------------------------------------------------------------------- /Facebook Demo/PostPhotoViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ScreenShotViewController.h 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/6/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "FBFeedPost.h" 11 | #import "IFNNotificationDisplay.h" 12 | 13 | @interface PostPhotoViewController : UIViewController { 14 | IBOutlet UITextView *txtCaption; 15 | IBOutlet UIImageView *imageView; 16 | } 17 | 18 | @property (nonatomic, retain) IBOutlet UITextView *txtCaption; 19 | @property (nonatomic, retain) IBOutlet UIImageView *imageView; 20 | 21 | - (IBAction) btnPostPress:(id) sender; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Facebook Demo/PostPhotoViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ScreenShotViewController.m 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/6/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "PostPhotoViewController.h" 10 | 11 | 12 | @implementation PostPhotoViewController 13 | @synthesize txtCaption, imageView; 14 | 15 | - (IBAction) btnPostPress:(id) sender { 16 | 17 | [self.txtCaption resignFirstResponder]; 18 | 19 | //we will release this object when it is finished posting 20 | FBFeedPost *post = [[FBFeedPost alloc] initWithPhoto:self.imageView.image name:self.txtCaption.text]; 21 | [post publishPostWithDelegate:self]; 22 | 23 | IFNNotificationDisplay *display = [[IFNNotificationDisplay alloc] init]; 24 | display.type = NotificationDisplayTypeLoading; 25 | display.tag = NOTIFICATION_DISPLAY_TAG; 26 | [display setNotificationText:@"Posting Photo..."]; 27 | [display displayInView:self.view atCenter:CGPointMake(self.view.center.x, self.view.center.y-100.0) withInterval:0.0]; 28 | [display release]; 29 | } 30 | 31 | #pragma mark - 32 | #pragma mark FBFeedPostDelegate 33 | 34 | - (void) failedToPublishPost:(FBFeedPost*) _post { 35 | 36 | UIView *dv = [self.view viewWithTag:NOTIFICATION_DISPLAY_TAG]; 37 | [dv removeFromSuperview]; 38 | 39 | IFNNotificationDisplay *display = [[IFNNotificationDisplay alloc] init]; 40 | display.type = NotificationDisplayTypeText; 41 | [display setNotificationText:@"Failed To Post"]; 42 | [display displayInView:self.view atCenter:CGPointMake(self.view.center.x, self.view.center.y-100.0) withInterval:1.5]; 43 | [display release]; 44 | 45 | //release the alloc'd post 46 | [_post release]; 47 | } 48 | 49 | - (void) finishedPublishingPost:(FBFeedPost*) _post { 50 | 51 | UIView *dv = [self.view viewWithTag:NOTIFICATION_DISPLAY_TAG]; 52 | [dv removeFromSuperview]; 53 | 54 | IFNNotificationDisplay *display = [[IFNNotificationDisplay alloc] init]; 55 | display.type = NotificationDisplayTypeText; 56 | [display setNotificationText:@"Finished Posting"]; 57 | [display displayInView:self.view atCenter:CGPointMake(self.view.center.x, self.view.center.y-100.0) withInterval:1.5]; 58 | [display release]; 59 | 60 | //release the alloc'd post 61 | [_post release]; 62 | } 63 | 64 | #pragma mark - 65 | #pragma mark LoadView 66 | 67 | - (void)viewDidLoad { 68 | [super viewDidLoad]; 69 | 70 | self.title = @"Post A Photo"; 71 | 72 | UIBarButtonItem *btnPost = [[UIBarButtonItem alloc] initWithTitle:@"Post" style:UIBarButtonItemStyleBordered 73 | target:self action:@selector(btnPostPress:)]; 74 | self.navigationItem.rightBarButtonItem = btnPost; 75 | [btnPost release]; 76 | } 77 | 78 | 79 | - (void)didReceiveMemoryWarning { 80 | // Releases the view if it doesn't have a superview. 81 | [super didReceiveMemoryWarning]; 82 | 83 | // Release any cached data, images, etc. that aren't in use. 84 | } 85 | 86 | - (void)viewDidUnload { 87 | [super viewDidUnload]; 88 | // Release any retained subviews of the main view. 89 | // e.g. self.myOutlet = nil; 90 | } 91 | 92 | 93 | - (void)dealloc { 94 | [txtCaption release]; 95 | [imageView release]; 96 | [super dealloc]; 97 | } 98 | 99 | 100 | @end 101 | -------------------------------------------------------------------------------- /Facebook Demo/StatusViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // StatusViewController.h 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/6/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "FBFeedPost.h" 11 | #import "IFNNotificationDisplay.h" 12 | 13 | @interface StatusViewController : UIViewController { 14 | IBOutlet UITextView *txtView; 15 | } 16 | 17 | @property (nonatomic, retain) IBOutlet UITextView *txtView; 18 | 19 | - (IBAction) btnPostPress:(id) sender; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Facebook Demo/StatusViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // StatusViewController.m 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/6/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "StatusViewController.h" 10 | 11 | 12 | @implementation StatusViewController 13 | @synthesize txtView; 14 | 15 | - (IBAction) btnPostPress:(id) sender { 16 | 17 | [self.txtView resignFirstResponder]; 18 | 19 | //we will release this object when it is finished posting 20 | FBFeedPost *post = [[FBFeedPost alloc] initWithPostMessage:self.txtView.text]; 21 | [post publishPostWithDelegate:self]; 22 | 23 | IFNNotificationDisplay *display = [[IFNNotificationDisplay alloc] init]; 24 | display.type = NotificationDisplayTypeLoading; 25 | display.tag = NOTIFICATION_DISPLAY_TAG; 26 | [display setNotificationText:@"Posting Status..."]; 27 | [display displayInView:self.view atCenter:CGPointMake(self.view.center.x, self.view.center.y-100.0) withInterval:0.0]; 28 | [display release]; 29 | } 30 | 31 | #pragma mark - 32 | #pragma mark FBFeedPostDelegate 33 | 34 | - (void) failedToPublishPost:(FBFeedPost*) _post { 35 | 36 | UIView *dv = [self.view viewWithTag:NOTIFICATION_DISPLAY_TAG]; 37 | [dv removeFromSuperview]; 38 | 39 | IFNNotificationDisplay *display = [[IFNNotificationDisplay alloc] init]; 40 | display.type = NotificationDisplayTypeText; 41 | [display setNotificationText:@"Failed To Post"]; 42 | [display displayInView:self.view atCenter:CGPointMake(self.view.center.x, self.view.center.y-100.0) withInterval:1.5]; 43 | [display release]; 44 | 45 | //release the alloc'd post 46 | [_post release]; 47 | } 48 | 49 | - (void) finishedPublishingPost:(FBFeedPost*) _post { 50 | 51 | UIView *dv = [self.view viewWithTag:NOTIFICATION_DISPLAY_TAG]; 52 | [dv removeFromSuperview]; 53 | 54 | IFNNotificationDisplay *display = [[IFNNotificationDisplay alloc] init]; 55 | display.type = NotificationDisplayTypeText; 56 | [display setNotificationText:@"Finished Posting"]; 57 | [display displayInView:self.view atCenter:CGPointMake(self.view.center.x, self.view.center.y-100.0) withInterval:1.5]; 58 | [display release]; 59 | 60 | //release the alloc'd post 61 | [_post release]; 62 | } 63 | 64 | #pragma mark - 65 | #pragma mark LoadView 66 | 67 | // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. 68 | - (void)viewDidLoad { 69 | [super viewDidLoad]; 70 | 71 | self.title = @"Status Post"; 72 | 73 | UIBarButtonItem *btnPost = [[UIBarButtonItem alloc] initWithTitle:@"Post" style:UIBarButtonItemStyleBordered 74 | target:self action:@selector(btnPostPress:)]; 75 | self.navigationItem.rightBarButtonItem = btnPost; 76 | [btnPost release]; 77 | 78 | [txtView becomeFirstResponder]; 79 | } 80 | 81 | 82 | - (void)didReceiveMemoryWarning { 83 | // Releases the view if it doesn't have a superview. 84 | [super didReceiveMemoryWarning]; 85 | 86 | // Release any cached data, images, etc. that aren't in use. 87 | } 88 | 89 | - (void)viewDidUnload { 90 | [super viewDidUnload]; 91 | // Release any retained subviews of the main view. 92 | // e.g. self.myOutlet = nil; 93 | } 94 | 95 | 96 | - (void)dealloc { 97 | [txtView release]; 98 | [super dealloc]; 99 | } 100 | 101 | 102 | @end 103 | -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app.dSYM/Contents/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleIdentifier 8 | com.apple.xcode.dsym.com.yourcompany.Facebook-Demo 9 | CFBundleInfoDictionaryVersion 10 | 6.0 11 | CFBundlePackageType 12 | dSYM 13 | CFBundleSignature 14 | ???? 15 | CFBundleVersion 16 | 1.0 17 | 18 | 19 | -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app.dSYM/Contents/Resources/DWARF/Facebook Demo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app.dSYM/Contents/Resources/DWARF/Facebook Demo -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/FBDialog.bundle/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/FBDialog.bundle/images/close.png -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/FBDialog.bundle/images/fbicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/FBDialog.bundle/images/fbicon.png -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/Facebook Demo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/Facebook Demo -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/Info.plist: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/Info.plist -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/MainWindow.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/MainWindow.nib -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/PkgInfo: -------------------------------------------------------------------------------- 1 | APPL???? -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/PostLinkViewController.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/PostLinkViewController.nib -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/PostPhotoViewController.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/PostPhotoViewController.nib -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/RootViewController.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/RootViewController.nib -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/ScreenShotViewController.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/ScreenShotViewController.nib -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/StatusViewController.nib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/StatusViewController.nib -------------------------------------------------------------------------------- /Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/icodeblog-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/icodeblog-icon.png -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Facebook Demo-all-target-headers.hmap: -------------------------------------------------------------------------------- 1 | pamh@ -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Facebook Demo-generated-files.hmap: -------------------------------------------------------------------------------- 1 | pamhx -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Facebook Demo-own-target-headers.hmap: -------------------------------------------------------------------------------- 1 | pamh@ -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Facebook Demo-project-headers.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Facebook Demo-project-headers.hmap -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Facebook Demo.hmap: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Facebook Demo.hmap -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Facebook Demo~.dep: -------------------------------------------------------------------------------- 1 | 4117ce79d9c7ed3020b00a8e4ab68270 0ecd88414738cfe82bbf38ba291bcc32 ffffffffffffffffffffffffffffffff 408 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app 2 | 00000000000000000000000000000000 73b2739fb07b40728aa357518812470d ffffffffffffffffffffffffffffffff 11849 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/icodeblog-icon.png 3 | 000000004d7397eb0000000000005c9f fb4e41ec4017639e889c1fd959e32e6c ffffffffffffffffffffffffffffffff 1584 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/ScreenShotViewController.nib 4 | 000000004d73928a000000000005c2fc 80f6e5a2046934b7e67a4305e9d5deba ffffffffffffffffffffffffffffffff 1707 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/PostLinkViewController.nib 5 | 000000004d738e38000000000005b5b4 9440fb4e64defd9b9c0f3eea5538db1a ffffffffffffffffffffffffffffffff 1338 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/StatusViewController.nib 6 | 00000000000000000000000000000000 bbdb31f07c7211d07e66d500ec6beeab ffffffffffffffffffffffffffffffff 102 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/FBDialog.bundle 7 | 000000004d6ce8120000000000004458 afc0f1fe2abd9ca0a9521a48c3a5c031 ffffffffffffffffffffffffffffffff 979 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/RootViewController.nib 8 | 000000004d6ce812000000000000600c f1ea776739d1f1d90145bb02f13bef0b ffffffffffffffffffffffffffffffff 1515 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/MainWindow.nib 9 | 00000000000000000000000000000000 32e07d73e4861c5eec8c0ee8f2bb90da ffffffffffffffffffffffffffffffff 8 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/PkgInfo 10 | 00000000000000000000000000000000 32e07d73e4861c5eec8c0ee8f2bb90da ffffffffffffffffffffffffffffffff 615 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/Info.plist 11 | 00000000000000000000000000000000 4d42cce49552af8781a8efd87cbbedfc ffffffffffffffffffffffffffffffff 102 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app.dSYM 12 | 41d65c43e61056262a013e510070c500 797a09cc8d61a626a48a75f2f92fe5a3 ffffffffffffffffffffffffffffffff 176392 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Debug-iphonesimulator/Facebook Demo.app/Facebook Demo 13 | becdd85c8a595b50d44e874ab6567c91 621984d52010394b59615dad5fb45a83 ffffffffffffffffffffffffffffffff 50928 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/PostPhotoViewController.o 14 | becdd85c8a595dcfd44e874ab6567c98 560e0c1eb78ccd6a1fc6f103562d3be0 ffffffffffffffffffffffffffffffff 50840 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/PostLinkViewController.o 15 | becdd85c8a594712d44e874ab6567f5f 32faf4f5e2e8eba4171327fa8290e18a ffffffffffffffffffffffffffffffff 49496 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/StatusViewController.o 16 | becdd85c8a595159d44e874ab6566e88 f41f6a010c21494c32cbbb9c8845f8f2 ffffffffffffffffffffffffffffffff 56284 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBRequestWrapper.o 17 | becdd85c8bebe019d44e874ab656783f e97c244a3585c9e9a49ea48b56144b5c ffffffffffffffffffffffffffffffff 56420 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBFeedPost.o 18 | becdd85c8bf49a85d44e874ab6566709 57ab6d190193f944e56b7840fd9a5627 ffffffffffffffffffffffffffffffff 25664 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonWriter.o 19 | becdd85c8b957144d44e874ab65653b6 ebf756d6f9dd844746430421459e4ae7 ffffffffffffffffffffffffffffffff 35916 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonParser.o 20 | becdd85c8a07a4d5d44e874ab65677c8 6e7ec6c96fe1093e470cfa3b9d081cc2 ffffffffffffffffffffffffffffffff 13328 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonBase.o 21 | becdd85c8a07a4d5d44e874ab6567b91 5b9fa9016bba2d6e25a0646e4efd18f1 ffffffffffffffffffffffffffffffff 20196 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJSON.o 22 | becdd85c8a664f1cd44e874ab6567095 66abcb55f03c757de6fc220b8598bcfa ffffffffffffffffffffffffffffffff 7836 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSString+SBJSON.o 23 | becdd85c8a664f6bd44e874ab6566eea 57d8084a12e00d082652126fb9bd5e6a ffffffffffffffffffffffffffffffff 7912 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSObject+SBJSON.o 24 | becdd85c8a07a4d5d44e874ab65643fa 6b77a3d8d9dba601bf55ce41c438c6af ffffffffffffffffffffffffffffffff 31588 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSString+HTML.o 25 | becdd85c8a664599d44e874ab65654d5 7388211f351922ade7bff2d7a6c9e911 ffffffffffffffffffffffffffffffff 43644 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBRequest.o 26 | becdd85cc6c687ced44e874ab6566922 40552d9ccfd77a9a397cdb77a18ffc56 ffffffffffffffffffffffffffffffff 45660 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBLoginDialog.o 27 | becdd85c8a07ae95d44e874ab6566e99 97caf21232071cc1525536a42651cacb ffffffffffffffffffffffffffffffff 46592 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBImageView.o 28 | becdd85cc698714cd44e874ab65621c3 5b0309300781f2203e837d105660686b ffffffffffffffffffffffffffffffff 110456 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBDialog.o 29 | becdd85cc6c6869ad44e874ab6563dd5 c6e215baff430c4a600a45145ca50d2c ffffffffffffffffffffffffffffffff 71304 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/Facebook.o 30 | becdd85c8bebf9e6d44e874ab6567902 07fc17adcc19bfdb7a04f6e87075eff1 ffffffffffffffffffffffffffffffff 46604 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/RootViewController.o 31 | becdd85c8a5944a0d44e874ab656722a f7d72ebf02cde8ae2583e14402e31eb3 ffffffffffffffffffffffffffffffff 53052 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/Facebook_DemoAppDelegate.o 32 | becdd85cc76b4687d44e874ab6566920 403c81ff92a07c8ede0786af9ff41090 ffffffffffffffffffffffffffffffff 6388 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/main.o 33 | 0000000001df185a0000000000000556 becdd85cc7199ed0d44e874ab65667bb ffffffffffffffffffffffffffffffff 15461584 /var/folders/Mn/MnkK02EGFLGsaT4BoyZ-n++++TM/-Caches-/com.apple.Xcode.502/SharedPrecompiledHeaders/Facebook_Demo_Prefix-bsjpweoegaqddualuubjbwofcqnw/Facebook_Demo_Prefix.pch.gch 34 | ffffffffffffffffffffffffffffffff babb0360b3379889bbeb1f61177654b0 ffffffffffffffffffffffffffffffff 0 /Users/ayanok/Desktop/icodeblog post/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/ScreenShotViewController.o 35 | -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBDialog.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBDialog.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBFeedPost.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBFeedPost.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBImageView.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBImageView.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBLoginDialog.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBLoginDialog.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBRequest.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBRequest.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBRequestWrapper.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBRequestWrapper.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/Facebook Demo.LinkFileList: -------------------------------------------------------------------------------- 1 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/main.o 2 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/Facebook_DemoAppDelegate.o 3 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/RootViewController.o 4 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/Facebook.o 5 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBDialog.o 6 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBImageView.o 7 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBLoginDialog.o 8 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBRequest.o 9 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSString+HTML.o 10 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSObject+SBJSON.o 11 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSString+SBJSON.o 12 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJSON.o 13 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonBase.o 14 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonParser.o 15 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonWriter.o 16 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBFeedPost.o 17 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/FBRequestWrapper.o 18 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/StatusViewController.o 19 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/PostLinkViewController.o 20 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/PostPhotoViewController.o 21 | /Users/ayanok/Documents/Public Sample Code/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/IFNNotificationDisplay.o 22 | -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/Facebook.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/Facebook.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/Facebook_DemoAppDelegate.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/Facebook_DemoAppDelegate.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/IFNNotificationDisplay.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/IFNNotificationDisplay.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSObject+SBJSON.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSObject+SBJSON.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSString+HTML.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSString+HTML.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSString+SBJSON.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/NSString+SBJSON.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/PostLinkViewController.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/PostLinkViewController.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/PostPhotoViewController.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/PostPhotoViewController.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/RootViewController.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/RootViewController.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJSON.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJSON.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonBase.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonBase.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonParser.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonParser.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonWriter.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/SBJsonWriter.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/StatusViewController.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/StatusViewController.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/main.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Debug-iphonesimulator/Facebook Demo.build/Objects-normal/i386/main.o -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/categories.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/categories.pbxbtree -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/cdecls.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/cdecls.pbxbtree -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/decls.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/decls.pbxbtree -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/files.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/files.pbxbtree -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/imports.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/imports.pbxbtree -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/pbxindex.header: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/pbxindex.header -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/protocols.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/protocols.pbxbtree -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/refs.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/refs.pbxbtree -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/strings.pbxstrings/control: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/strings.pbxstrings/control -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/subclasses.pbxbtree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/subclasses.pbxbtree -------------------------------------------------------------------------------- /Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/symbols0.pbxsymbols: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/build/Facebook Demo.build/Facebook Demo.pbxindex/symbols0.pbxsymbols -------------------------------------------------------------------------------- /Facebook Demo/icodeblog-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ayanok/Andy-Yanok---Public-Sample-Code/45c9f60c4ae6cc0b767aa3dedb3cecf715b85a13/Facebook Demo/icodeblog-icon.png -------------------------------------------------------------------------------- /Facebook Demo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // Facebook Demo 4 | // 5 | // Created by Andy Yanok on 3/1/11. 6 | // Copyright 2011 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | int main(int argc, char *argv[]) { 12 | 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | int retVal = UIApplicationMain(argc, argv, nil, nil); 15 | [pool release]; 16 | return retVal; 17 | } 18 | --------------------------------------------------------------------------------