Posted on by

At Corona Labs, we strive to provide as much cross-platform functionality as possible. Now Corona apps built for Android can utilize the “Social” plugin. Everything that you need to know from a code standpoint is detailed in the original tutorial: Introducing the “Social” Plugin (iOS).

That being said, there are a few differences on Android…

There is Only One “Service”

With iOS, you have to determine if native.showPopup() will show a Facebook dialog, a Twitter dialog, or a SinaWeibo dialog. On Android, it shows the Android “sharing panel” which includes buttons for everything that supports sharing. As you install and remove apps from your Android device, the options on this screen will change. As such, in your code, you don’t have to provide the “service” option in the options table. Don’t be concerned if you’re using this key in your existing code for iOS — it will simply be ignored on Android.


Facebook is not Available in this Plugin

There is a known bug between Facebook and Android that prevents the Android sharing intent from posting to Facebook. As such, Facebook recommends that developers use the regular Facebook methods to post to Facebook.

Finally, please note that this plugin is currently in the beta stage. If you locate any bugs, please report them.

Posted by . Thanks for reading...

22 Responses to “Revisiting the Social Plugin, Now on Android”

    • Rob Miracle

      In addition to what David said. The reason this particular plugin doesn’t support Facebook has a bug using the Android sharing intent, which this plugin uses. The timeline for fixing that is in Facebook’s court. As David pointed out, we have native Facebook support for building your own Facebook sharing. Please look in the SampleApps that come with Corona in the Networking folder. There are a couple of different Facebook apps you can look at to see the coded needed to implement Facebook outside of this plugin.

  1. helios

    maybe there’s a bug between android and facebook?? coz i managed to login using the “facebook” and “scrumptious” corona examples but i got the folowing error when im in, “the page your requested cannot be displayed right now. it may be temporarily unavailable, the link you clicked maybe broken or expired, or you may not have permission to view this page.”

  2. helios

    im thinking maybe i should unistall the built-in Facebook app and re-download it. . maybe updating the FB app will fix the problem?? i dunno

  3. helios


    yeah, i got both appID and keyhash .. the examples didnt show how to use the ‘keyhash’ . .do you have a link where and how they will be used?

  4. Joe

    It’s a great feature and I tried on my Android device, but I see this popup

    “Unable to find application to form this action”

    I think I at least have gmail configured, why would I see this?

  5. Steve

    Hi, for some reason android share via; has stopped working. Now I’m just getting this window.

    Share via:
    No apps can perform this action.

  6. tbaker

    I am also getting “No apps can perform this action.” on android with facebook and twitter. Works great on ios. 2013.2087.

    local function onFacebook(event)
    native.showAlert( “Facebook”, “Message “.. event.action, { “Ok” })
    local options = {
    service = “facebook”,
    message = “Join me”,
    listener = onFacebook
    native.showPopup( “social”, options )

    • Rob Miracle

      Facebook is not supported on Android. Still, if you bring up the share dialog in other apps, do you see twitter? It only picks up whatever the OS has configured.


  7. Edvin

    I have a problem for use social plugin for Twitter! SMS ok, e-mail ok… but use for tweets is a marathon! I search in documentation and forum but not have a solution.
    I try, but the message is:

    “The social popup is currently not supported on this plaftorm, please build for an iOS device.”

    The version of my simulator is 2013.2100 (2013.12.7)

    • Rob Miracle

      You need to be a Pro or Enterprise subscriber to use the Social plugin. What subscription level are you?

  8. Viral

    I have a problem for use social plugin for Twitter! When i am trying to share image via twitter using social plugin. i got error image could not be loaded.

    i am pro subscriber of Corona.

    i am using Build: 2014.2170


  9. Mahdi

    Is there a way to achieve something similar to this on iOS? Because I notice that iOS has a similar share system (one button share to Message, Mail, Twitter and Facebook, etc.), but from the article above, it’s stated that “With iOS, you have to determine if native.showPopup() will show a Facebook dialog, a Twitter dialog, or a SinaWeibo dialog.”.

    • Rob Miracle

      We did a tutorial on a sliding panel this week. You can use it, add in a background and the icons for the services you want to support to the group returned by the panel.

  10. miguel

    In version 2214 , windows, android 4.3 with twitter configured and network connection the line

    local isTwitterAvailable = native.canShowPopup( “social”, “twitter” )

    returns false.

    I´m i missing something?


  11. Teodor

    As i saw other apps on android can share via Facebook without an login! So what you are saing is that we will never have the possibility to share content on Facebook without implamenting the facebook sdk?

    • Rob Miracle

      My understanding from Engineering is that this is related to a bug between Google and Facebook that’s still unresolved. Perhaps once this is resolved, we can try to address it.


Leave a Reply

  • (Will Not Be Published)