iOS深层链接(案例:共享链接到Feed,而不是打开图表)

时间:2013-05-08 07:54:53

标签: facebook deep-linking

我们将以下链接分享给Facebook:

[FBRequestConnection startWithGraphPath:@"me/feed"
                                         parameters:aDic
                                         HTTPMethod:@"POST"
                                  completionHandler:^(FBRequestConnection *connection, id result, NSError *error){
                                      if (error) {
                                          NSLog(@"error: domain = %@, code = %d", error.domain, error.code);
                                          failure(error);
                                      } else {
                                          NSLog(@"Published order action: %@", [result objectForKey:@"id"]);
                                          success([result objectForKey:@"id"]);
                                      }
                                  }];

我们尝试了两个参数案例:

案例1:使用“url”设置目标

caption = "https://fanme.so/mf9nlL";
message = "...";
name = "...";
picture = "https://stream.fanme.in/images/icon.png";
url = "https://thefan.me/170/788120";

案例2:使用“link”设置目标

caption = "https://fanme.so/mf9nlL";
link = "https://thefan.me/170/788120";
message = "...";
name = "...";
picture = "https://stream.fanme.in/images/icon.png";

在案例1中,深层链接是正常的但是targetURL(我们在AppDelegate中解析)是“picture”键中的url。

在案例2中,深层链接无效。 iOS FB App中的链接无法启动我们的iOS应用程序。但我们可以通过“链接”键(通过Facebook网站测试)找到targetURL可以使用url。

我们想知道为什么“图片”设置为targetURL而不是案例1中的“url”。

我们现在正在使用iOS Facebook SDK 3.5。 我们需要一些帮助。谢谢。

0 个答案:

没有答案