dcmen / socialauth-android

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

twitter handling 403 duplicate tweet error #91

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. connect to twitter and authorise
2. post a tweet
3. post the same duplicate tweet

What is the expected output? What do you see instead?
 Shouldn't MessageListener.onError  return this 403 status ? it is not returning. I have also checked in onExecute. When the post is successful,  it is returning in onExecute , but in the case of 403 Error ,no.

What version of the product are you using? On what operating system?
social auth 4.2 with social auth android  2.5. (downloaded 17 june 2013)

Please provide any additional information below.
I am using a custom UI and on button click calling  
adapterTwitter.authorize(ctx, Provider.TWITTER).  

like

           layout.setOnClickListener(new OnClickListener() {

                @Override
                public void onClick(View arg0) {

                    adapterTwitter.authorize(ctx, Provider.TWITTER);
                }
            });

Original issue reported on code.google.com by Newaz...@gmail.com on 17 Jun 2013 at 10:59

GoogleCodeExporter commented 9 years ago
Hi , Facebook and Twitter not allows duplicate post. It is considered spam.

Original comment by vineet.a...@3pillarglobal.com on 17 Jun 2013 at 11:16

GoogleCodeExporter commented 9 years ago
Hi, yes I know, I wanted to handle this event and show this to user in android. 
That is why I needed a callback.

Original comment by Newaz...@gmail.com on 17 Jun 2013 at 11:18

GoogleCodeExporter commented 9 years ago
what status code are you getting in onexecute

Original comment by vineet.a...@3pillarglobal.com on 17 Jun 2013 at 11:20

GoogleCodeExporter commented 9 years ago
Hi,
In case of posting duplicate tweet, it is not entering  neither into onexecute 
nor onerror in response.

the trace is  is:

06-17 13:23:39.969: I/TwitterImpl(29814): Loading plugins
06-17 13:23:39.969: I/TwitterImpl(29814): Loading plugin :: 
org.brickred.socialauth.plugin.twitter.FeedPluginImpl
06-17 13:23:39.979: I/TwitterImpl(29814): Loading plugin :: 
org.brickred.socialauth.plugin.twitter.AlbumsPluginImpl
06-17 13:23:43.629: D/Twitter(29814): Authentication Successful
06-17 13:23:43.629: D/Twitter(29814): Provider Name = twitter

06-17 13:23:43.629: I/TwitterImpl(29814): Updatting status Mi piace Italian 
Style - 我爱意大利时尚杂志. Scarica Italian Style anche tu - 
你也可以下载意大利时尚杂志 
https://play.google.com/store/apps/details?id=com.rcs.italianstyle.android
06-17 13:23:45.039: D/SocialAuthError(29814): 
org.brickred.socialauth.exception.SocialAuthException: Failed to update status 
on http://api.twitter.com/1.1/statuses/update.json?status= ......... Status :403

Original comment by Newaz...@gmail.com on 17 Jun 2013 at 11:28

GoogleCodeExporter commented 9 years ago
in case of exception , it will go into

dialogListener.onError(new SocialAuthError("Message Not Posted", e));

so you can result from responselistener on error.

alternatively you can can catch socialauthexception in your code

Original comment by vineet.a...@3pillarglobal.com on 17 Jun 2013 at 11:34