I am having some trouble while trying to share content from my app into Facebook. I am using the following code to do it:
facebookButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(ShareDialog.canShow(ShareLinkContent.class)){
ShareLinkContent linkContent=new ShareLinkContent.Builder()
.setContentUrl(Uri.parse(imageUrls.get(0)))
.build();
shareDialog.show(linkContent, ShareDialog.Mode.WEB);
}
}
});
My images are stored on Firebase Storage and I am able to post on Facebook as well but the title and description are both set to firebasestorage.googleapis.com like this linked image: screenshot of share post
Note : The setContentDescription() and setContentTitle() and setImageUrl() are all deprecated. Is there a way to set the title,and description of the shared post?