1

I'm using Facebook's Mobile Hosting API for iOS and open Graph Stories, I want to know how to pass an id with FBSDKShareOpenGraphObject so when selected on Facebook it goes to that particular content in app. So far this is how my Share Dialog looking like:

NSDictionary *properties = @{
                             @"og:type": @"product.group",
                             @"og:title": [NSString stringWithFormat:@"%@",self.group.nameCompleted],
                             @"og:description": [NSString stringWithFormat:@"is hanging at %@",self.group.locationName],
                             @"og:url": @"https://fb.me/HOST_ID"
                             };
NSLog(@"Group Id %@", self.groupId);
FBSDKShareOpenGraphObject *object = [FBSDKShareOpenGraphObject objectWithProperties:properties];
// Create an action
FBSDKShareOpenGraphAction *action = [[FBSDKShareOpenGraphAction alloc] init];
action.actionType = @"ACTION-TYPE";
[action setObject:object forKey:@"group"];

// Create the content
FBSDKShareOpenGraphContent *content = [[FBSDKShareOpenGraphContent alloc] init];
content.action = action;
content.previewPropertyName = @"group";

[FBSDKShareDialog showFromViewController:self
                             withContent:content
                                delegate:nil];

I want to know how I can send a "group id" associated with this "group" so when I handle to the:

-(BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation;

I can show the right view controller and the correct group info.

0 Answers0