lucianchen / socialauth-android

Automatically exported from code.google.com/p/socialauth-android
0 stars 0 forks source link

Image upload in Facebook issue #77

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Try to upload a picture to facebook via:
2. adapter.authorize(context, Provider.FACEBOOK);
3. (in DialogListener onComplete): adapter.uploadImage("test message", 
"file_name_screenshot.jpg", image, 100);

What is the expected output? What do you see instead?
Expected: each time the code is invoked, the bitmap and message are posted in 
Facebook.
Observed: the bitmap is uploaded every second time. This seems to be 
reproducible 100%: first attempt results in "D/SocialAuthAdapter(15003): Image 
Upload Error", next attempt: "D/SocialAuthAdapter(15003): Image Uploaded", next 
attempt again "D/SocialAuthAdapter(15003): Image Upload Error", etc.

What version of the product are you using? On what operating system?
2.1 on Android
jars taken from: http://code.google.com/p/socialauth-android/issues/detail?id=52

Please provide any additional information below.

Original issue reported on code.google.com by kkonda...@gbg.bg on 25 May 2013 at 9:05

GoogleCodeExporter commented 8 years ago
If this helps in any way, I observe the same behavior in Twitter upload, here 
is the log from the first upload attempt:

05-25 13:15:14.925: I/SocialAuthManager(3332): Connecting provider : twitter
05-25 13:15:14.925: I/TwitterImpl(3332): Verifying the authentication response 
from provider
05-25 13:15:14.925: I/OAuth1(3332): Verifying the authentication response from 
provider
05-25 13:15:15.030: W/IInputConnectionWrapper(3332): getSelectedText on 
inactive InputConnection
05-25 13:15:15.030: W/IInputConnectionWrapper(3332): setComposingText on 
inactive InputConnection
05-25 13:15:15.030: W/IInputConnectionWrapper(3332): getExtractedText on 
inactive InputConnection
05-25 13:15:15.460: D/dalvikvm(3332): GC_CONCURRENT freed 1310K, 11% free 
42570K/47559K, paused 2ms+10ms, total 50ms
05-25 13:15:15.515: D/AbsListView(3332): [unregisterDoubleTapMotionListener]
05-25 13:15:15.515: I/MotionRecognitionManager(3332):   .unregisterListener : / 
listener count = 0->0, listener=android.widget.AbsListView$4@421725a0
05-25 13:15:16.345: I/System.out(3332): screen_name, MerlinBG1
05-25 13:15:16.345: I/System.out(3332): user_id, 1456658839
05-25 13:15:16.555: I/TwitterImpl(3332): Uploading Image :: 
file_name_screenshot.jpg, message :: test message
05-25 13:15:16.560: D/SocialAuthAdapter(3332): Image Upload not implemented for 
Provider

P.S. Could you remove the System.out messages with user name and user id?

Original comment by kkonda...@gbg.bg on 25 May 2013 at 11:22

GoogleCodeExporter commented 8 years ago
One last piece of information - in all cases the authorization is completed - 
the dialogs for both facebook and twitter appeared only once at first login, 
after this they do not appear, no matter if the upload is successful or not.

Original comment by kkonda...@gbg.bg on 25 May 2013 at 3:47

GoogleCodeExporter commented 8 years ago
Hi , use adapter.uploadImageAsync.

Check Custom-UI example for full implementation.

Original comment by vineet.a...@3pillarglobal.com on 27 May 2013 at 8:27

GoogleCodeExporter commented 8 years ago
Hi, thank you, herewith I confirm, that it works well from the first attempt by 
using uploadImageAsync.
Thanks!

Original comment by kkonda...@gbg.bg on 27 May 2013 at 4:53

GoogleCodeExporter commented 8 years ago
Thanks for feedback.

Original comment by vineet.a...@3pillarglobal.com on 28 May 2013 at 9:31

GoogleCodeExporter commented 8 years ago
can i upload multiple images on facebook in the similar manner.. please 
somebody answer me..

Original comment by srikara....@telibrahma.com on 3 Dec 2013 at 9:50

GoogleCodeExporter commented 8 years ago
Hi vineet,

uploadImageAsync is throwing exception.

In library res = getCurrentProvider().uploadImage()

Is throwing exception org.brickred.socialauth.exception.SocialAuthException: 
java.io.IOException: Unexpected response code for CONNECT: 400.

Please resolve that issue i am wating for your response.

Original comment by dear.vi...@gmail.com on 11 Nov 2014 at 10:14