【发布时间】:2015-01-14 17:09:11
【问题描述】:
我正在努力让我的应用在 iOS 上与 AppLinks 一起工作。当我尝试发布到 /me/feed 时,我收到一个错误,并且“msg = (#100) 链接格式不正确”。我知道它“应该”工作,因为我编写了第二个调用我的应用程序调用 UIApplication:openURL 并且它工作得很好。我知道我的链接格式正确。这是发帖的代码:
[FBRequestConnection startWithGraphPath:@"/me/feed"
parameters:params HTTPMethod:@"POST"
completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
参数是: (lldb) po 参数 { 应用程序=数字测试ID; 链接 = "urlschemestring://play/content?contentId=1"; 消息 = cohggjfkhf; 图片 = "http://img.youtube.com/vi/opmApx_el-U/mqdefault.jpg"; }
plist 中有以下内容:
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>com.companyname.Appname</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fbnumericaltestid </string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>FacebookAppID</key>
<string>numericaltestid </string>
<key>FacebookUrlSchemeSuffix</key>
<string>urlschemestring </string>
<key>FacebookDisplayName</key>
<string>Appname</string>
【问题讨论】:
-
链接应以 http 或 https 开头。然后您使用应用链接使该链接直接在您的应用中打开