Can Corona enable (limited) Facebook sharing on Android via native.showPopup()?

Am I missing something about the way this works?

I want the user to share something using Twitter, facebook, or Email etc…  (a link and some text)

  • User clicks share button, cannot see Facebook icon because there is text but can see twitter
  • Try to remove the text before I get to the Andorid share screen (sure facebook is there now but maybe I wanted to tweet, so no text shows up, just an empty 140 chars.

So I need to create an icon to share via Facebook, or all other?

I think that is already how it has been working in Corona all along, The only difference now is if I blank out the text part I can see a Facebook icon, but makes most other social sharing icons worthless due to the now missing text?

@Rob

Thanks looking forward to future updates.

@Tim,

Yeah, you’re missing something, but that’s cool.  These talks are always a little hard to follow.  The problem I’m encountering is:

  • Android ONLY.
  • Facebook is not consistently available in the pop-up list launched by native.showPopup( “social”, { … } )
    • The key word here is ‘consistently’.  It seems some devices have it some don’t.
      • In all cases the official Facebook App is installed on the device, so this is not the cause.
    • This problem occurs in the face of all combinations of ‘options’ which I’ve passed to it.  So, it is not as simple as not passing a message.  It just doesn’t work in some cases.
  • Additionally, I get two Twitter icons which is fine as they do different things, but was initially confusing to me and still confusing to my client.
  • I normally use the ‘facebook’ plugin paired with a facebook (web) app to handle posts, credentials, etc.  However this time around the user wants Instagram if it is available and the only way to get that on Android is via the social plugin.

Note: I am not complaining about Corona by the way.  I think the issue has always been with Facebook and their ever changing API and rules.  

So does passing an image currently work?

Have you tried?

Rob

yup, crashes app with latest plugin build (and message set to “”)

Enterprise build or SDK build?

What error are you getting?

Is this implemented now? Because I have to choose between image or url (but not both) in latest stable.

As far as I know we rolled out changes a few months ago that lets you specify both. If the resulting dialog box from Android doesn’t handle it, then that’s on Google.

Rob

(Just to clarify, not to repeat: In 2015.2646, if you specify an image, all is well. If you specify a url, all is well. If you specify both, the url is ignored.)

Note also that if canShowPopup returns false despite the app being installed, or if the app is installed but doesn’t appear in the Android share menu, check account settings for the app. Phones aren’t basically never rebooted, and the user could ride on just the first-time login to the app for weeks, basically. And that won’t store credentials in the app so that it can grant sharing. This was the case with Facebook on iOS. There’s nothing you can do about it, in the end I gave up and showed an informative error message reflecting this.

Rob: Can Corona fix its Android sharing mechanism so text can be shared as well as a URL?

Other Android apps including Feedly (I just tested) can do it. Right now Corona-built apps are at a disadvantage. If we add “message = headline/text/etc.” to the options table, Facebook does not appear. If we remove “message = headline/text/etc.” from the options table, Facebook does appear, but then no headline or text can be shared on Twitter, just a URL. :frowning: My app is now in beta and my users are, reasonably, asking for this to work like other Android apps.

Again, this is not an Android limitation. Feedly can do it. It is a limitation of Corona SDK.

Also other Android apps correctly show Twitter as two different sharing icons: Direct Message and Tweet. Unfortunately Corona-build apps confusingly show both Twitter options listed twice with the same name (Twitter, not Direct Message and Tweet). This also is not an Android limitation. It is a limitation of Corona SDK.

I suspect this means it’s time for Corona to update its Android sharing mechanism. If it were just one problem, maybe you could wait, but broken sharing to the world’s two most popular social networks means it’s time for a fix. Fortunately it should be an easy one, I expect.

Thanks (from my users) in advance!

@corona273,

There are two techniques of accessing Facebook from a Corona App:

  1. Social Plugin - Not a lot of permissions, but easy to implement.
  2. Facebook Plugin - Requires you create a ‘facebook app’ on their server.  Then, your mobile app ‘logs in’ in to facebook via the facebook app.  This gives you a lot more permissions and possibilities for accessing data.

My guess is that ‘Feedly’ (as per your example) is allowed to pre-populate because they used something similar to the second technique.

Finally, Rob may say something different, but I’m also guessing that the issue here is Facebook and not Corona.  Facebook very tightly controls access to their ‘network’ and APIs.  This is why they, in effect, force you to use the graph library (facebook plugin option above) to do anything interesting.

While, I too wish this were easy, I think it will forever require more effort than simply using the social plugin.  Again, all my opinion, but also based on some trials and experience.

that ‘Feedly’ (as per your example) is allowed to pre-populate 

Thanks for your quick response! You have a habit of thoughtful posts, and I appreciate your reply. But Feedly does not pre-populate text. I’m not asking for that, and I apologize if my post above was unclear.

To try again: I’m merely asking Corona SDK-built apps to have the same sharing functionality as other Android apps. That means being able to hand off text and a URL to the Android system sharing mechanism, and having Facebook and Twitter (listed properly) appear. I am not asking Corona to send pre-populated text to Facebook. To be clear, Feedly does not send pre-populated text; only the URL appears and Facebook discards any accompanying text. That’s fine.

The problem is that Corona SDK’s implementation of Android sharing currently forces developers to choose from one of two unpalatable options: share the headline/text (which incorrectly removes Facebook as a sharing option) or don’t share the headline/text (which vexes our users because they have to retype it). Other Android apps work properly when the headline/text is shared; they send it to Facebook, which ignores it in favor of only the URL.

I’m sorry if I sound frustrated; if I do, I’m channeling what my users are complaining about for my non-game app. They want things to Just Work. Things should; I started this thread last November. Hence my requests today!

I just installed feedly, but it does appear they are using something more like the Facebook plugin,

I seems the only way we can get the functionality we need it to provide our own menu of share icons.

What I did(and I am not happy about it) I added a share icon, when tapped it drops down with two options “Facebook” and “Other”

when you tap Facebook it uses the Facebook plugin, and other used the standard Social Plugin to open the default Android share options.

There does not seems to be a point to passing only a url to the social plugin ever unless that is all you ever want to share, since you don’t know if the user will choose between Facebook or twitter etc before the social plugin open. there can only be a URL, which stinks.

So until there is a better way, I think adding “Facebook” and “Other” is the only way to get the functionality.

I noticed in Feedly, when I did not have twitter installed it asked if I want to install it since they hard coded the social selections in their app.

@corona273,

Ah.  Sorry, I misunderstood your post.  I hope I didn’t dilute the thread and question too much w/ my response.

Yes, I too would like to see the Android sharing list behave a little nicer:

  • Include FB option regardless of presence of body text.
  • Only show one Twitter icon.

Roger that.  :slight_smile:

<roaminggamer>: Thanks! What I’d like is for Corona SDK-built apps to work as well as any other Android app. Unfortunately Android sharing to both Facebook and Twitter is currently broken.

<tim.geiges>: There’s precisely zero evidence Feedly is doing anything akin to the Facebook plugin. I install Feedly. I tap on the top-right menu. I tap Android share. I get the Android system sharing panel with FB and Twitter properly listed. I’m never asked to authenticate with Facebook.

Also I just talked to an experienced native Android developer who told me this is the way any Android app should work; Corona merely needs to fix things on their end. Hoping this will happen soon!

In looking at Feedly again, I was not clicking on the standard little “fork” icon or “Android share” yes when I do this I do in fact see Facebook and any other twitter/sharing app etc, I open Facebook and it works as expected, then I open twitter and behold all the text and URL etc are all there, so there is certainly a way to tell Android’s built in sharing mechanism how to properly share regardless of network!

And yes that is what everyone is asking about, I am not sure why Coronalabs is unable to do this when others can.

Clearly nearly all devs want people to share things about their game progress, or news links etc.

The engineers are looking at the plugin again.

Rob

Thanks, Rob. All we want is for Corona sharing to work as well as any other random Android app. As <tim.geiges> said in this thread, it’s a shame that all of our Corona-built apps are “unable to do this when others can.” :frowning:

I did not think sharing both text and URL was that important to users. But then we entered beta. And they really, really care about having it work as they expect. Thanks for looking into fixing this.

Good to hear that, ill be looking forward to this fix.

Thank you Rob

Any news on this one, Rob?