简体   繁体   English

Android:Facebook分享内容链接

[英]Android : Facebook share link with content

I am trying to share a link with content in android. 我正在尝试与android中的内容共享链接。 I want this in Android eclipse. 我想要在Android Eclipse中使用。

I tried in Android Studio, it was working perfectly. 我在Android Studio中尝试过,它运行良好。

compile 'com.facebook.android:facebook-android-sdk:4.6.0' 编译'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
}

this code is working perfectly in Android Studio. 此代码在Android Studio中可以完美运行。

When I try this in eclipse it is not working. 当我在日食中尝试时,它不起作用。 I add the library for FacebookSDK library , but the " ShareLinkContent " is not importing in eclipse 我为FacebookSDK库添加了库,但是“ ShareLinkContent ”没有在Eclipse中导入

can any one please help me 谁能帮帮我吗

ohk got your issue ohk收到您的问题

if you wanna .jar file for non compile library for eclipse you can use 如果您想将.jar文件用于非编译库以供日食使用,则可以使用

https://developers.facebook.com/docs/android/downloads https://developers.facebook.com/docs/android/downloads

you can use https://origincache.facebook.com/developers/resources/?id=facebook-android-sdk-4.10.1.zip or above version for eclipse 您可以使用https://origincache.facebook.com/developers/resources/?id=facebook-android-sdk-4.10.1.zip或更高版本进行蚀

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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