简体   繁体   中英

Facebook share with link, title, description and image android

I am trying to share some data over Facebook through below code but it is not displaying.

ShareDialog shareDialog = new ShareDialog(BillsDetailWebActivity.this);
ShareLinkContent content = new ShareLinkContent.Builder()
                .setContentTitle(billTitle)
                .setImageUrl(Uri.parse("some image uri"))
                .setContentDescription("some desc")
                .setContentUrl(Uri.parse(preferenceManager.getURL()))
                .build();
shareDialog.show(content, ShareDialog.Mode.AUTOMATIC);

Any help to just add these details once shared over FB? Thanks in advance.

As of April 18, 2017 , the following parameters are no longer supported by Graph API versions 2.9 and higher. For versions 2.8 and lower, the parameters will continue working until July 17, 2017 .

  • contentTitle
  • imageURL
  • contentDescription

These params not supported by Facebook anymore.

For more info go to this Facebook Official doc

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM