小编典典

迅捷3:输入“是吗?” 没有下标成员

swift

我的图形请求不断出现此错误?

输入“是吗?” 没有下标成员

错误指向结果…。这仅在我转换为Swift 3时发生了…有人吗????

 let nextrequest: FBSDKGraphRequest = FBSDKGraphRequest(graphPath: "me/friends", parameters: ["fields": "name, id, gender"], httpMethod: "GET")
            nextrequest.start { (connection, result, error) -> Void in
                guard let listOfFriends = result["data"] as? [AnyObject] else {
                    return
                }
            }
        }

阅读 283

收藏
2020-07-07

共1个答案

小编典典

试试这个

let nextrequest: FBSDKGraphRequest = FBSDKGraphRequest(graphPath:"me/friends", parameters: ["fields": "name, id, gender"], httpMethod: "GET")
    nextrequest.start { (connection, result, error) -> Void in
         guard let result = result as? [String:[AnyObject]], let listOfFriends = result["data"]  else {
        return
    }
  }
}
2020-07-07