Hi so basically I want to share to Facebook using their Facebook API but how do I add the link that if they click they can go back to the app or they will go to the app store if they don’t have the app installed?
Edit ^
So I want to clear up my question. So for example in the app I have a product page that displays a product. And then I share that product to facebook and when you post it in facebook (I already know how to add the image and text) I want it to display the app and when you click the app it goes straight TO that product page IF the app is installed. If not then it will go to the app store to download that product.
2
Answers
If i understood your question correctly then following could fix your problem. It would check if Facebook is installed in device , if FB is installed then it would open Facebook otherwise it would open iTunes link to download the app. This is swift 4. Also you need to add URL scheme for FB in info.plist
First make sure to connect the IBAction to your view controller code.
URL sharing:
Text sharing:
Image sharing:
When user click on Facebook button to share it will directly connect them either to App-store(for those who don’t have it) or to the Facebook for sharing.