FBOpenGraphAction runtime error in Swift

我只是一个虾纸丫 提交于 2019-12-11 10:08:07

问题


I am trying to create a Facebook custom story in my iOS App. I am developing the app in Swift.

var graphObject: NSMutableDictionary = FBGraphObject.openGraphObjectForPostWithType(
    "app: type",
    title: "new", 
    image: nil,
    url: nil, 
    description: "description"
)

        (I am getting a runtime error on the following line)
        **var graphAction: FBOpenGraphAction = FBGraphObject.graphObject() as FBOpenGraphAction**


graphAction.setObject(UIImage(named: "default"), forKey: "image")
graphAction.setObject(graphObject, forKey: "break")

Am i doing something wrong while declaring the FBOpenGraphAction? Any help would be appreciated.

Thanks

来源:https://stackoverflow.com/questions/25055801/fbopengraphaction-runtime-error-in-swift

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!