Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Sending an Open Graph message with video.wants_to_watch action
// In order to display a Open Graph Action in your Facebook Share Dialog (FBDialog), you can construct your code like this:
NSMutableDictionary<FBOpenGraphAction> *action = (NSMutableDictionary<FBOpenGraphAction> *)[FBGraphObject graphObject];
NSMutableDictionary *graphObject = [FBGraphObject openGraphObjectForPostWithType:@"video.movie"
title:@"My movie."
image:@"http://www.mymovie.com/poster.jpg"
url:@"http://www.mymovie.com"
description:@"This movie may contain adult material."];
action[@"movie"] = graphObject;
[FBDialogs presentMessageDialogWithOpenGraphAction:action
actionType:@"video.wants_to_watch"
previewPropertyName:@"movie"
handler:^(FBAppCall *call, NSDictionary *results, NSError *error) {
if (error) {
NSLog(@"error: %@", [error localizedDescription]);
} else {
NSLog(@"results: %@", results);
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.