This is an Android sample app with integrations for sharing to Facebook and Instagram Reels. After running the app, you will reach a screen where you can upload media from your phone's gallery app.
You can choose to share with or without a sticker. If you choose one of the sticker options, the media is shared with an embedded sticker.
The integration code is available under app/src/main/java/com/example/android_share_to_reels
. There, you can find buttons for sharing to Reels. Each button has an onClick event listener. You can find the code for the Share to Reels integration there.
⚠️ You will need to enable FacebookSdk for your project. Follow the instructions on this link for that.
In order to run the sample app you will need to install some required software, as follows:
- Android Studio
- Android AutoUpgrader
- Android NDK
- Java Runtime AutoUpgrader
- Adopt OpenJDK 8
In order to run the app, you will need to update the code and add your Facebook Developer App ID and Client Token. If you don't have an app, check out this link.
Update the following file(s):
- app/src/main/res/values/strings.xml
You will need to replace YOUR_APP_ID
with your app's ID and YOUR_CLIENT_TOKEN
with your app's client token. Your app's ID can be found here. The client token can be found in your app's dashboard by following these steps:
- Sign into your developer account.
- On the Apps page, select an app to open the dashboard for that app.
- On the Dashboard, navigate to Settings > Advanced > Security > Client token.
- Open the sample app project on Android Studio.
- Enable dev mode on your Android phone.
- Connect your phone to your Mac or PC using a USB cable.
- Your phone should appear on the devices tab in Android Studio.
- Select your phone and click on the play button. The app should load on your phone.
Enabling Dev Mode on Your Android Phone
- Open the Settings App.
- Scroll down to About Phone.
- Tap Software Information.
- Tap Build number seven times.
- Enter your pin or password.
- Go back to the initial screen of the Settings App and the Developer Options tab should be there.
- Access the Developer Options on your phone and enable USB debugging.
If you want to see the iOS integration, you can access this project.
Share to Reels Android is Meta Platform Policy licensed, as found in the LICENSE file.