Skip to content

Instantly share code, notes, and snippets.

@gHashTag
Created August 5, 2014 13:49
Show Gist options
  • Save gHashTag/053e285da6809985d0bf to your computer and use it in GitHub Desktop.
Save gHashTag/053e285da6809985d0bf to your computer and use it in GitHub Desktop.
Access_token
- (void)viewDidLoad
{
[super viewDidLoad];
self.loginView.readPermissions = @[@"public_profile", @"email", @"user_friends"];
[FBRequestConnection startWithGraphPath:@"/{746086925448119}/feed"
parameters:nil
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
NSLog(@"Error: %@", error);
}];
AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager];
NSDictionary *parameters = @{@"access_token": @"CAAUabIUsvc0BANW1q3mco6qv0h3JBhdTZBNSMwh1obtosWt9hkOgvbKV2xTQcxrs0lS1QjiuBfJZBeLzKYt5mW2cR9k6Oo644cXww78SnI1aAGjm3vER0w8wo2VQ5xRHbNEteclnioV1hSEsATGiJZCDpksqOpUgi5yW9tWZAAZA9DthTBlzTv09FCZBiUZAP4NntcoH5cGW1QTJj0qplCbAU5U1MOQjMMZD"};
[manager GET:@"https://graph.facebook.com/v2.0/258169294359677/feed" parameters:parameters success:^(AFHTTPRequestOperation *operation, id responseObject) {
NSLog(@"JSON: %@", responseObject);
} failure:^(AFHTTPRequestOperation *operation, NSError *error) {
NSLog(@"Error: %@", error);
}];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment