skip to Main Content

I have Firebase invites working with email and SMS just fine. I’m clueless when it comes to sharing via Facebook or twitter however. What are my options for sharing data with invites to facebook via Firebase? I can’t find any info on this anywhere – except that Facebook offers its own invite api. I’m trying to just use Firebase if possible though, so I’m just trying to figure out how to customize the “share sheet” that I see referenced in various loctions online (without much info associated with those references). I can’t tell if the share sheet is just a list of actions that I need to handle my own way, with just the email and sms option handled by google and I handle the rest of the options using the various apis out there.

In my current implementation, I use the deep link that the invite exposes and store the id of some data that I want the specific user to have access to. Then store that data in a firebase database. But what is the correct method to share to facebook users? Is it to just use facebook’s api and expose it somehow in my own “custom share sheet”? Where can I find documentation on the share sheet?

Thanks for clarifying any of this if you can!

Cheers,
Mike

2

Answers


  1. My answer might not be ideal as I am looking for an alternative as well, but you could manually add different social media shares manually. What I wanted to do was send a deep link using the share feature already implemented by google but with no luck.

    // Regular share I want to use this and send deep link :(
                        Intent myShare = new Intent(Intent.ACTION_SEND);
                        myShare.setType("text/plain");
                        String shareBody= "Messsage here";
                        String sub = "Title";
                        myShare.putExtra(Intent.EXTRA_SUBJECT, sub);
                        myShare.putExtra(Intent.EXTRA_TEXT, shareBody);
                        startActivity(Intent.createChooser(myShare, "Share using"));
    
    /FACEBOOK SHARE
                        /*ShareLinkContent content = new ShareLinkContent.Builder()
                                .setContentUrl(Uri.parse("deeplinkhere"))
                                .build();
                        ShareDialog shareDialog = new ShareDialog(HomepageActivity.this);
                        shareDialog.show(content);*/
    
                    // Google Invites
                   /* Intent inviteIntent = new AppInviteInvitation.IntentBuilder(getString(R.string.invitation_title))
                            .setMessage(getString(R.string.invitation_message))
                            .setDeepLink(Uri.parse(getString(R.string.invitation_deep_link)))
                            .setCustomImage(Uri.parse(getString(R.string.invitation_custom_image)))// the image address on server for invite by email.
                            .setCallToActionText(getString(R.string.invitation_cta))
                            .build();
                    startActivityForResult(inviteIntent, REQUEST_INVITE);*/
                    //startActivity(new Intent(HomepageActivity.this,InviteActivity.class));
    
    Login or Signup to reply.
  2. Currently I believe the only way to share to sources other than Email & SMS you would need to implement your own custom sharing functionality. It’s hinted at in the Invites Documentation Best Practices section titled “Build a Custom Share Sheet”.

    Firebase Invites is built on top of Firebase Dynamic Links so if you want a link that takes the users to the app store to install your app you can create a simple dynamic link using one of these methods.

    For implementing custom share sheets it depends on your platform as each has a different way of implementing sharing functionality.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search