What to import to use Facebook Graph API in iOS? -
i need user friends list. understood how login fb app button. can not come across on line:
which header file should import use graph api?
/* make api call */ [fbrequestconnection startwithgraphpath:@"/{friendlist-id}" completionhandler:^( fbrequestconnection *connection, id result, nserror *error
i installed frameworks see below, , included header. can not see graph stuff.
#import <fbsdkcorekit/fbsdkcorekit.h> #import <fbsdkcorekit/fbsdkcorekit.h> #import <fbsdkloginkit/fbsdkloginkit.h>
try using in way updated in sdk 4.0
[[[fbsdkgraphrequest alloc] initwithgraphpath:@"/me/friends" parameters:nil] startwithcompletionhandler:^(fbsdkgraphrequestconnection *connection, id result, nserror *error) { if (!error) { nslog(@”fetched user:%@”, result); } }];
refer : https://developers.facebook.com/docs/ios/graph#fetching
Comments
Post a Comment