Created
August 5, 2014 09:39
-
-
Save gHashTag/5417f8c4e00cd3f7a0e2 to your computer and use it in GitHub Desktop.
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
#import "ViewController.h" | |
#import <AFNetworking/AFNetworking.h> | |
@interface ViewController () | |
@property (strong, nonatomic) NSDictionary *posts; | |
@property (strong, nonatomic) NSMutableArray *post; | |
@end | |
@implementation ViewController | |
- (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]; | |
[manager GET:@"http://graph.facebook.com/746086925448119/feed" parameters:nil 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