Facebook deep linking with iOS app

Viewed 13002

I am using below code to post to Facebook. It is working perfectly but when i replace MY_URL with myapp://test_page// the post won't appear in Facebook timeline.

If i'm doing something wrong then please tell me how can i deep-link my app to Facebook app. I've searched almost all stackoverflow.com pages & other Facebook developer tutorials but i can not understand that.

NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0];
[params setObject:@"Check out my post in myapp" forKey:@"message"];
[params setObject:MY_URL forKey:@"link"];
[params setObject:MY_IMAGE_URL forKey:@"picture"];
[params setObject:self.strQuestion forKey:@"name"];
[params setObject:@"" forKey:@"caption"];
[params setObject:self.strDescription forKey:@"description"];

[FBRequestConnection startWithGraphPath:@"me/feed" parameters:params HTTPMethod:@"POST"
 completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
     NSLog(@"FACEBOOK DONE");
 }];
2 Answers
Related