1
我想實現我的應用程序在Facebook分享功能,但是當我點擊分享按鈕我獲得下面的圖片:發佈至Facebook通過Android不顯示圖片
下面的代碼我正在使用:
ShareDialog shareDialog = new ShareDialog(ResultsActivity.this);
if (ShareDialog.canShow(ShareLinkContent.class)) {
ShareLinkContent linkContent = new ShareLinkContent.Builder()
.setQuote("Hi Guys, I have completed Level " + level + " and I scored " + score + ". Can you beat my score?")
.setContentUrl( Uri.parse("http://play.google.com/store/apps/details?id="
+ getPackageName()))
.build();
shareDialog.show(linkContent);
}
谷歌播放鏈接工作正常,它有圖標圖像和必要的圖像。 當我在網上瀏覽解決方案時,我發現Facebook OpenGraph Debugger有助於確定原因。所以,我用this鏈接尋找任何原因和Facebook在抱怨缺少OG:類型,如下圖所示:
,我應該在Android Studio中,爲了解決這個問題,添加什麼碼?任何幫助或建議將不勝感激。