2016-07-19 62 views
0

我想与android中的内容共享一个链接。我想在Android eclipse中使用它。Android:Facebook分享链接内容

我在Android Studio中试过,它工作的很完美。

编译 'com.facebook.android:facebook-android-sdk:4.6.0'

if (ShareDialog.canShow(ShareLinkContent.class)) { 
    ShareLinkContent linkContent = new ShareLinkContent.Builder() 
     .setContentTitle("How to share content") 
     .setImageUrl(Uri.parse("https://www.numetriclabz.com/wp-content/uploads/2015/11/114.png")) 
     .setContentDescription("simple LinkedIn integration") 
     .setContentUrl(Uri.parse("https://www.numetriclabz.com/android-linkedin-integration-login-tutorial/")) 
     .build(); 
    shareDialog.show(linkContent); // Show facebook ShareDialog 
} 

这段代码是Android Studio中正常使用。

当我在eclipse中尝试这个时,它不起作用。我想补充的FacebookSDK库库,但“ShareLinkContent”是不是在Eclipse进口

任何一个可以请帮我

+0

从哪里下载FacebookSDK库 和它是相同的版本? –

+0

facebook SDK 4.6.0现在不可用于“https://developers.facebook.com/docs/android/downloads”@Vishal Patel –

回答