Closed fi4sk0 closed 3 years ago
Does new NativeShare().SetText("INSERT_URL_HERE").Share();
not work? If it doesn't, I might have to change the code as you suggested.
@yasirkula setText
doesn't do the same thing because some apps use url to fetch website metada and add website image and title like below:
Nice plugin btw, thanks for your efforts.
AFAIK, WhatsApp can fetch the link from the text (SetText) and show the website metadata. Which apps failed to show the website metadata when using SetText? On which platform did this happen?
I did a quick test by adding NSURL into share items. Seems like current solution works except twitter app:
I guess that's ok because it'll probably create website card after you press "tweet" button.
Thanks for the test! I also think that the current solution is OK at the moment.
+1, AddLink()
method would be really nice
Hey there @yasirkula and thanks for your assets. I just found them and they saved a ton of time for me! Keep up the good work!
Something I struggled with was to share links. I found out, that on iOS you can just send a list of objects to the share menu and depending on what kind of object they are, the menu changes.
Since I just wanted to share a link in my app, I changed line 24 of NativeShare.mm https://github.com/yasirkula/UnityNativeShare/blob/7beb32c3b2f0b71cf8b2a158bdecc08d95c8d986/Plugins/NativeShare/iOS/NativeShare.mm#L24
to
but maybe there could be a more general approach? Maybe something
new NativeShare().AddLink()
. I haven't tested that yet but I'll probably run into the same problem on Android. Any thoughts on that?Cheers, Timo