This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Joe I need help |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I need Help really really bad |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
what up joe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
what up joe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)facebookLoginWithCompletion:(void (^)(NSString *userID, NSString *email, NSString *fullName))completion | |
{ | |
self.accountStore = [[ACAccountStore alloc] init]; | |
ACAccountType *accountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; | |
NSDictionary *options = @{ | |
ACFacebookAppIdKey:FACEBOOKAPPID, | |
ACFacebookPermissionsKey: @[@"read_stream", @"basic_info"], | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (void)getFacebookFriendsListWithCompletion:(void(^)(NSArray *friendsDictionaries))completion | |
{ | |
NSURL *feedURL = [NSURL URLWithString:@"https://graph.facebook.com/me/friends"]; | |
ACAccountType *accountType = [self.accountStore accountTypeWithAccountTypeIdentifier:ACAccountTypeIdentifierFacebook]; | |
NSArray *accounts = [self.accountStore accountsWithAccountType:accountType]; | |
NSDictionary *params = @{@"limit": @5000, | |
@"offset": @0}; | |
SLRequest *request = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:feedURL parameters:params]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Parse.Cloud.define("friends", function(request, response){ | |
var query = new Parse.Query("User"); | |
query.containedIn("facebook_id", request.params.facebook_ids_array); | |
query.find({ | |
success: function(results){ | |
var friendIDs = new Array(); | |
for (var i = 0; i < results.length; i++) | |
{ | |
friendIDs.push(results[i].get('facebook_id')); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.stepLabel = [[UILabel alloc] init]; | |
self.stepLabel.text = @"0 Steps"; | |
self.stepLabel.textAlignment = NSTextAlignmentCenter; | |
self.stepLabel.font = [UIFont fontWithName:@"HelveticaNeue-UltraLight" size:50]; | |
self.historicalLabel = [[UILabel alloc] init]; | |
self.historicalLabel.text = @"Historical"; | |
self.historicalLabel.textAlignment = NSTextAlignmentCenter; | |
self.historicalLabel.font = [UIFont fontWithName:@"HelveticaNeue-UltraLight" size:50]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Implement Reduce | |
func reduceRecursively <A, R>(xs: [A], initialValue: R, combine:(R, A) -> R) -> R { | |
if let head = xs.first { | |
let tail = Array(dropFirst(xs)) | |
return reduceRecursively(tail, combine(initialValue, head), combine) | |
} else { | |
return initialValue | |
} | |
} | |
OlderNewer