IPhone : Facebook Open Graph Custom Story?

on Monday, March 30, 2015

I'm trying to let user share his action that he made on mobile app without using dialog , so i'm using open graph and create my custom story and action but i have no idea how to pass action type and parameters ??


so can anyone explain it to me or help ?



if ([[FBSDKAccessToken currentAccessToken] hasGranted:@"publish_actions"]) {
[[[FBSDKGraphRequest alloc]
initWithGraphPath:@"me/feed"
parameters: @{ @"message" : @"hello world" ,@"type":@"Check-In Place" , @"og:type" : @"place" , @"og:title" :@"Steakhouse, Star Avenue" , @"og:url" : @"www.google.com"}
HTTPMethod:@"POST"]
startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if (!error) {
NSLog(@"Post id:%@", result[@"id"]);
}
}];
}

0 comments:

Post a Comment