I'm using the UIActivityViewController to share an image and url from within my app.
I'm having trouble formatting the facebook post. I attach an image using a subclassed UIActivityItemProvider
and provide the text for the post in the same way.
I want to add a url, but it needs my apps custom url scheme in front of it like this
myurl://image?url=http://imageurl.com
The problem is, when this is posted, only the last half of the url is clickable (from http:// onwards). Which means it doesn't open my app with the url.
Is there another way to do this?
I know I can create an app on Facebook, but how can I tie the two together using the UIActivityViewController
?
Thanks
If you have select App Installs as your objective you can add a Deferred Deep Link. In the Ads Manager, select New AdSet and scroll to Ad Creative. Add your deep link or a URL with Facebook App Links metadata implemented to take users to a specific location in the app after installing.
The Facebook SDK for iOS and Android includes the product App Links, which will enable you to support deferred deep linking in your app. In addition to your deep link implementation, just add the following code to your app to handle deferred deep links:
The new Facebook app is built using Objective-C as against previous once in HTML5 which used to support URL scheme mechanism. This link gives a hint on that.
A custom URL scheme is a mechanism through which third-party apps can communicate with each other. It doesn't allow you the provision to open a page in that particular application. It just fires an event to bring the called Application to the foreground.
You have 2 options :
Create a simple server-side web service that will redirect from http://yourserver.com/linkToApp/image
to myurl://image
.
It could even show a different page/preview if the app is not installed/if you're not on an ios device.
Create a facebook app and use "Deep linking" (it will basically do the same for you..)
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