LinkedIn Social auth Image sharing error

458 views Asked by At

I am trying to share the image on the LinkedIn using the Socialauth API. I have already posted the Text successfully. But while i tried to share the image using its method adapter.uploadImage(message, fileName, bitmap, quality); ,its throwing "Image Upload Error".

I have tried to find the solution and checked below solution But none worked for me.

Solution 1

Also checked all the Issues Reported

Here is the code which i am trying.

 adapter.updateStatus(edit.getText().toString(),
            new MessageListener(), false);
File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM),
                        "Lighthouse.jpg");

    // to share on multiple providers
    adapter.updateStatus(edit.getText().toString(),
        new MessageListener(), false);
    Bitmap bitmap = BitmapFactory.decodeFile(file.getAbsolutePath());
        try {
            adapter.uploadImage("Image Posting","Lighthouse.jpg",
                    bitmap, 100);

        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

I get below error.

12-19 05:40:21.885: W/System.err(13230): org.brickred.socialauth.exception.SocialAuthException: Image Upload Error
12-19 05:40:21.894: W/System.err(13230):    at org.brickred.socialauth.android.SocialAuthAdapter.uploadImage(SocialAuthAdapter.java:1137)
12-19 05:40:21.894: W/System.err(13230):    at org.brickred.socialshare.ShareButtonActivity$ResponseListener$1.onClick(ShareButtonActivity.java:171)
12-19 05:40:21.894: W/System.err(13230):    at android.view.View.performClick(View.java:4204)
12-19 05:40:21.894: W/System.err(13230):    at android.view.View$PerformClick.run(View.java:17355)
12-19 05:40:21.894: W/System.err(13230):    at android.os.Handler.handleCallback(Handler.java:725)
12-19 05:40:21.894: W/System.err(13230):    at android.os.Handler.dispatchMessage(Handler.java:92)
12-19 05:40:21.894: W/System.err(13230):    at android.os.Looper.loop(Looper.java:137)
12-19 05:40:21.894: W/System.err(13230):    at android.app.ActivityThread.main(ActivityThread.java:5041)
12-19 05:40:21.894: W/System.err(13230):    at java.lang.reflect.Method.invokeNative(Native Method)
12-19 05:40:21.894: W/System.err(13230):    at java.lang.reflect.Method.invoke(Method.java:511)
12-19 05:40:21.894: W/System.err(13230):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-19 05:40:21.904: W/System.err(13230):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-19 05:40:21.904: W/System.err(13230):    at dalvik.system.NativeStart.main(Native Method)

Please Help me if anyone have faced this issue.

Any help will be appreciated.

Thanks.

1

There are 1 answers

0
AudioBubble On

For any Auth you need to add a Jar files of that API repository ,. If you already include this Jar file check them. its updated or not You Can get that Jar file form here

I tried a similar application faced a Oauth problem with jar file its solved

i think you already solved auth problem..

or may be problem with images... also and check your permissions.

I think You need to try this..

I hope this may be help full