【问题标题】:Get msg = (#100) link is not properly formatted when posting to /me/feed on iOS在 iOS 上发布到 /me/feed 时获取 msg = (#100) 链接格式不正确
【发布时间】: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 开头。然后您使用应用链接使该链接直接在您的应用中打开

标签: ios facebook applinks


【解决方案1】:

我在 Django 应用程序中遇到了同样的问题,但原因是我提供了“本地” URL (/path/to/object) 而不是完整 URL (http://domain.name/path/to/object);完整的 URL 前缀必须包含在 FB 应用程序设置中。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-12-18
    • 2016-04-29
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多