Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not run callback when can not tweet on Twitter #24

Closed
FrankNT opened this issue Jun 17, 2014 · 3 comments
Closed

Can not run callback when can not tweet on Twitter #24

FrankNT opened this issue Jun 17, 2014 · 3 comments

Comments

@FrankNT
Copy link

FrankNT commented Jun 17, 2014

Custom UI -> MessageListener

When I tweet on Twitter, it never run to Callback when Message not posted (When I post 1 message 2 or 3 times).

// To get status of message after authentication
private final class MessageListener implements SocialAuthListener<Integer> {
    @Override
    public void onExecute(String provider, Integer t) {
        Integer status = t;
        if (status.intValue() == 200 || status.intValue() == 201 || status.intValue() == 204)
            Toast.makeText(CustomUI.this, "Message posted on" + provider, Toast.LENGTH_LONG).show();
        else
            Toast.makeText(CustomUI.this, "Message not posted" + provider, Toast.LENGTH_LONG).show();
    }

    @Override
    public void onError(SocialAuthError e) {

    }
}
@vineetmobile
Copy link
Contributor

are you posting same message.

@FrankNT
Copy link
Author

FrankNT commented Jul 7, 2014

Yes, I am.

@FrankNT
Copy link
Author

FrankNT commented Jul 7, 2014

Actually I already know how to fix this issue. Just need to find and comment bellow code on TwitterImpl.java -> updateStatus function (line 279)

if (serviceResponse.getStatus() != 200) {
throw new SocialAuthException("Failed to update status on " + url + ". Status :" + serviceResponse.getStatus());
}

@FrankNT FrankNT closed this as completed Aug 16, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants