FaceBook ShareLinkContent setImageUrl is replaced by ContentUrl metadata in android

前端 未结 1 547
粉色の甜心
粉色の甜心 2021-01-23 04:27

I am using facebook version 4.14 in my app inorder to share Hashtag along with Imageurl and Contenturl using ShareLinkConent. Now Hashtag is successfully posted inFacbook .

1条回答
  •  北恋
    北恋 (楼主)
    2021-01-23 05:10

       ShareLinkContent linkContent = new ShareLinkContent.Builder()
                                        .setShareHashtag(shareHashTag)
                                        .setContentDescription(textd)
                                        .setContentUrl(Uri.parse(influencer.influencer_link))
                                        .setImageUrl(Uri.parse(selectedIceCreamImagePath))  //Uri.parse("https://d3kvf6cfq06287.cloudfront.net/influencer/image2_1469508676.jpg"))
                                        .build();
    
                                shareDialog.show(linkContent, ShareDialog.Mode.FEED);
    
    
    We need to open the ShareDialog with the Mode.FEED option.. Then our image will be posted correctly in FaceBook Feed
    

    0 讨论(0)
提交回复
热议问题