I'm writing a simple test app to upload a video to Facebook from iOS.
I'm finding it quite hard to find examples/tutorials online for how to do this with Swift since all the documentation for the FacebookSDK is in Objective-C.
I have this so far which puts a share button on my UI but it looks disabled, from what I have read this is because there is no content set but I can't see how that is possible.
let video_content : FBSDKShareVideoContent = FBSDKShareVideoContent()
video_content.video = FBSDKShareVideo(videoURL: getVideoURL())
let button : FBSDKShareButton = FBSDKShareButton()
button.shareContent = video_content
button.frame = CGRectMake((UIScreen.mainScreen().bounds.width - 100) * 0.5, 50, 100, 25)
self.view.addSubview(button)
my getVideoURL()
functions returns a NSURL which definitely contains the url to the video (I have printed it to console and checked it points to a video I have stored in a folder earlier).
I looked at the social framework and its a shame I can't use it because it seems it is only used for sharing photos and not able to share videos.
I'm using latest versions of Xcode, Swift and Facebook SDK.