Graph API with tvOS

You can also access the social graph in the same way as our SDK for iOS, see Using the Graph API, iOS. To do this you need an access token with the right permissions from the person using your app.


#import <FBSDKCoreKit/FBSDKCoreKit.h>

// If you have user_likes permission granted
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:@"me/likes" parameters:nil];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
  //TODO: process error or result.

For more information on user permissions, see Permissions with Facebook Login.