0

我运行此代码,但它不返回任何值。我很难将我的故事发布到 Facebook 时间线,以便在点击时简单地启动我的应用程序。我主要是移动应用程序,所以在尝试了元标记并且也不起作用之后,我正在尝试这种也不起作用的托管方法。有人知道我在做什么错吗?

[FBRequestConnection startWithGraphPath:@"/MyNumericFacebookAppID/app_link_hosts"
                             parameters:nil
                             HTTPMethod:@"GET"
                      completionHandler:^(
                                          FBRequestConnection *connection,
                                          id result,
                                          NSError *error
                                          ) {

                          _AppLinksHostURL_ID = [result objectForKey:@"id"]; // store this ID in an NSString

                          NSLog(@"App Links Result = %@", result);
                          NSLog(@"App Links Host URL ID = %@", _AppLinksHostURL_ID);

                          //[self postOGStoryWithCustomURL];
                          if(error) NSLog(@"error = %@", error.description);

                      }];
4

1 回答 1

0

app_link_hosts 端点需要一个应用程序访问令牌(带有您的应用程序密码),因此您不应该在您的应用程序中执行此操作(我将看到相应地更新文档)。

您应该通过 curl 命令创建它们,请参阅https://developers.facebook.com/docs/applinks/hosting-api

于 2014-12-08T23:01:09.063 回答