I posted the following facebook sharing link to native.showWebPopup(). The following link works in desktop browser. But I found it is not working in iOS webpopup. The facebook preview is not showing up in iOS. Am I doing anything wrong?
My guess is app transport security. In simple terms it means you have to add any website you want to make request or show any kind web view to your build.settings.
Learn how and Read more at: https://docs.coronalabs.com/guide/hardware/appleATS/index.html
I had this setting already for facebook, the link I want to share to facebook and also the thumbnail image for facebook. Is it correct?
[“facebook.com”] =
{
NSIncludesSubdomains = true,
NSThirdPartyExceptionAllowsInsecureHTTPLoads = true
},
[“myrandf.com”] =
{
NSIncludesSubdomains = true,
NSThirdPartyExceptionAllowsInsecureHTTPLoads = true
},
[“skin-solutions.rodanandfields.com”] =
{
NSIncludesSubdomains = true,
NSThirdPartyExceptionAllowsInsecureHTTPLoads = true
},
I can see the facebook login screen but I see the attached screen after the facebook login
Why don’t you just use the Facebook plugin?
Edit: assuming you app is not displaying the weird ads
you screen shot looks fine to me, you are running on iOS simulator I think it is supposed to look like that.
but I just want to share a link. I don’t setup any facebook apps.
also, what if user don’t have facebook app installed?
-
I recommend native show pop (social) https://docs.coronalabs.com/plugin/CoronaProvider_native_popup_social/index.html
-
It open safari to sign in
Plus I don’t know how happy Facebook will be you using their rest API on iOS vs their actual iOS sdk
I just tried the native popup social. It needs facebook app to be installed.
I am trying to open the link directly from the OS browser using: system.openURL(url)
So, what devices don’t have Facebook on them, this is old stats but over 86% of all devices have Facebook on them as of 2013 (http://www.tomsguide.com/us/Facebook-iOS-Android-Google-Apple,news-16588.html)
I bet this number is around the high 90% in 2016. And chance are if you don’t have Facebook apps, you are probably don’t know how to download any apps anyway(basically only use iPhones for phone and iPod touch for music).
As for the system open url, it is not the best idea to jerk users out of you app and into safari.
Thanks scottrules. I fully understand what you said. But I am just doing a small update for a really old app which has been five years ago. I want to keep everything as is if possible so that I don’t need to get approval from my customer for the changes. I really want to get the native.showWebPopup to work again if possible.
https://developers.facebook.com/docs/sharing/reference/feed-dialog
This might help.
Also I don’t think you need permission from the user, I just used the snl app to share something on facebook with their share sheet. It did not ask me to login into Facebook. I am 100% sure it is the same as corona native showpop. Plus I think more people will be willing to share if look like official Facebook fully customizable clean overlay share sheet vs just some webview. It is a cake walk to add native.showPop instead of native.webPopUp.
I know you may think I am shoving this idea down your throat, but I am just just trying to give you my opinion. You are welcome to use use showWebPopup or whatever, I just want you to clear of your options and I know I show more love to native way vs hacky way. At the end of the day, they both do the same thing in a different ways have thier pros and cons.
Edit: Just tried hipko’s (corona game) Facebook share sheet, works with out having to login in to Facebook
If you just want to share things, for iOS you should use the Activity plugin. For Android you would use the Social plugin. But in the Android case, social can only use apps installed on the device. Android doesn’t have the built-in Facebook and Twitter support like iOS does.
Rob
My guess is app transport security. In simple terms it means you have to add any website you want to make request or show any kind web view to your build.settings.
Learn how and Read more at: https://docs.coronalabs.com/guide/hardware/appleATS/index.html
I had this setting already for facebook, the link I want to share to facebook and also the thumbnail image for facebook. Is it correct?
[“facebook.com”] =
{
NSIncludesSubdomains = true,
NSThirdPartyExceptionAllowsInsecureHTTPLoads = true
},
[“myrandf.com”] =
{
NSIncludesSubdomains = true,
NSThirdPartyExceptionAllowsInsecureHTTPLoads = true
},
[“skin-solutions.rodanandfields.com”] =
{
NSIncludesSubdomains = true,
NSThirdPartyExceptionAllowsInsecureHTTPLoads = true
},
I can see the facebook login screen but I see the attached screen after the facebook login
Why don’t you just use the Facebook plugin?
Edit: assuming you app is not displaying the weird ads
you screen shot looks fine to me, you are running on iOS simulator I think it is supposed to look like that.