Share photo, video, link , any text from App to Facebook
App Main Activity | Share Photo | Share Any URL |
- Get started with Facebook App by following this tutorial
- Provide your Facebook App ID in Manifest.xml file (Replace {APP_ID} with your Facebook App ID )
- Create a resource file named
secret_api_key.xml
with following content (Replace {APP_ID} with your Facebook App ID )
<resources>
<string name="secret_facebook_app_id">{APP_ID}</string>
<string name="secret_facebook_login_protocol_scheme">fb{APP_ID}</string>
</resources>
setContentTitle
,setContentDescription
are now deprecated forShareContent
class & doesn't work- use
setQuote
method (setQuote
supports multiline, use\n
for that) - Video upload is not working . Contributions appreciated.
- For sharing video from url, follow btnShareLink
- For sharing photo from url, follow btnSharePhoto
- For sharing video from device, follow btnShareVideo
- Facebook app must be installed on the device
- Android version must be >= 4.3