The URI is generated using the FileProvider class. 1. Android FileProvider is a sub class of ContentProvider. Share image and text on facebook using intent in android Download Source code here Manifest.xml: Add the following permission in you mainfest.xml: