Im sharing image to Facebook to using Facebook SDK. problem is i dont know how to change those buttons to custom buttons. ex: if i trigger button then it shares with facebook.
here my code. this is the one Facebook give as default
let button : FBSDKShareButton = FBSDKShareButton()
button.shareContent = content
self.view.addSubview(button) // how can i trigger with my button
button.center = self.view.center // i dont want this in center either
I found a way of doing this. just need to hide the button that FBSDK gives and insert following code in action button
button.sendActionsForControlEvents(.TouchUpInside)
it will Programmatically fire the SDK button if we click that UIButton
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With