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

Thanks, Rob. Only one week left before my dessert delivery offer expires. :slight_smile:

FYI, there’s another request for Android Facebook sharing from yesterday afternoon here:

http://forums.coronalabs.com/topic/55675-social-plugin-facebook-on-android/

Well the good news is we think we have it fixed but it still has to go through a code review and testing before it gets released and given the current work load, your probably going to be off the hook for your desert offer but we are getting close.

Rob

Rob: Thanks for the update! As a gesture of good faith, I think it’s reasonable to be somewhat flexible on my end. I suspect a daily build released on April 1 or April 2 may still qualify for the Bi-Rite ice cream from San Francisco’s Mission district, Carmelitas from Batter Bakery, or Bourbon pecan pie… :slight_smile:

Hello all. I just ran into this when working with a client and wanted to double check…

Question: Did anyone in the community work out how to fix the ‘double twitter’ icon listing (see images above prior thread entry).

For reference, I’m currently using build 2015.2647 and I still see two Twitter icons listed when I call native.showPopup():

 local options = { service = "facebook", -- ignored on Android message = "some message", } native.showPopup( "social", options ) 

Note: I also tried this with and without a message body and get the same result.

My goal is to list Twitter, Facebook, and all other registered Social sharing apps, but for some reason there are two twitter icons and no Facebook option.  (I think this is an Android bug, and not a Corona issue at all. )

For now, it seems the only reliable way to get Facebook to work on Android (which I want as part of my choice set) is set up a facebook app and use the facebook plugin.

In closing, “if any community member has gotten this to work without going to those lengths, please share your code if you can.”

-Ed

I’m using build 2015.2638 and see Facebook correctly listed once when using Android showPopup sharing. I don’t have Twitter installed on my test device, which is a Nexus 5 with Android 5.1.1. In other words, it works as it should.

@Corona273,

Thanks!  I’ll give that a try!

If it works, I’ll file a bug too.

-Ed

@Corona273,

No joy…  :frowning:

Note: I’m using a Gen 1 Nexus 7 running Android 4.4.4 

I tried uninstalling Twitter just for giggles and that did not help either.  

Thanks again!  I still think this is an Android thing (or it could be my device, I’ll need to test on others.)

Actually I think this is not a bug but a feature.  I just opened the “Photos” app on my 1st Gen Nexus 7 running 5.x and I also got two twitter icons.  However it had text under the icons.  One was “Tweet” the other was “Direct Message”.

Our code allows us to block services, but we have no way of adding them. 

Rob

Hmm… I didn’t notice that.  Thanks for the insight.

I just wish I knew why Facebook is such a stinker.  

The app is installed,

Corona detects it (native.canShowPopup() returns true for “facebook”), 

It just doesn’t show up in the list.   

I usually implement facebook using the plugin, but I’m trying for a lightweight solution as the client doesn’t want to set up a facebook app for their game.

Aside from Facebook not showing up, I really love the social plugin because it lists Instagram, e-mail, and a bunch of other options…

Thank for the answer and time Rob.  

Honestly I’m not sure why canShowPopup() returns true for “facebook” on Android.  The Facebook popup is iOS only.  The “social” popup is a different beast.  It opens an Android share sheet.  We pass in photos, URL’s and text and the share sheet decides what apps to give to you.  We can block things but we can’t add things.

Since Facebook blocks anything with a pre-filled text (and from what I had read – it only supported URLs), when we fixed the plugin to allow URL’s to work, we were still blocking facebook if there were images.  Images are waiting for a code review since they apparently work.

Rob

@Rob,

Thanks man. I was unaware of these additional challenges to using FB via the social plugin.  I’ll try a URL only call and see what I get.  

Regardless, this is all food for thought, and in the future I’ll push clients to simply bite the bullet (small as it is) and make a facebook app, then I can do this the way I know works.  

Thanks again!

-Ed

PS - I’m not a social media user myself (being a bit of a luddite in that area), so I always have trouble getting excited about adding it to a product.  :slight_smile:

Apparently Ed, Facebook does allow images.  The information on what they allow is confusing.  If you are following their developer forum posts, you get plenty of “yes it works” vs. “no it doesn’t”.  So when you get that kinda problem, all you can do is try it yourself.  We went back after the last release that allowed URL’s only to work and tried it passing images in and it does work.  Once those changes clear a code review, we will build a new version of the plugin and you should be able to do both images and URL’s, just not a pre-filled message.

Rob

Hello,

Any new’s ?

Really need this for my app =D

Have a nice day

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.  

I just posted an update a couple of days ago.  Nothing has changed since.

Rob you know when the problem will be fixed to android?

We don’t have an ETA.  I hope we will find some engineering time soon, but the engineers are super slammed right now.

Rob

Looking forward to having this feature.

So does passing an image currently work?