Twitter回调网址不会再次打开我的应用程序

时间:2018-06-01 13:43:52

标签: android android-studio twitter twitter4j

我正在使用Twitter4j库,我在Twitter开发者网站上的应用程序设置中设置了回调网址,其名称与我在我的应用程序中的数据标记中使用的相同,之后我在我的应用程序中设置了回调网址相同的价值,但在我授权我的应用程序后,Twitter网站停留在重定向我的应用程序,它不起作用。

以下是我认为失败的代码部分。

回调网址设置为" Twitearch-Android://"在开发者网站上。

的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)));

            }
        });

0 个答案:

没有答案
相关问题