I set the callback url at my app settings on Twitter developer website with the same name I used in data tag in my application, after that I set my callback url at my app with the same value, but after I authorize my app, the Twitter website stucks at redirecting at my application, it doesn’t works.
Here are the parts of my code I think they are failing.
The callback url is setted as “Twitearch-Android://” in developers website.
AndroidManifest.xml
<data android:scheme="Twitearch-Android" android:host="OAuthForTwitter" />
MainActivity
public final static String TWIT_URL = "Twitearch-Android://";
autorizar.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Log.e("ONCLICKLISTENER",TwitearchRequestToken.getAuthenticationURL());
String authURL = TwitearchRequestToken.getAuthenticationURL();
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(authURL)));
}
});