接收Parse登录的空白facebook webview

时间:2015-07-24 21:12:26

标签: java android facebook parse-platform facebook-login

我正在尝试使用Parse将我的应用程序与Facebook集成,但每当我登录(安装和未安装Facebook应用程序)时,我都会收到一个空白的webview。唯一可能的"错误"我在运行时得到的是以下内容:

07-24 16:09:05.103  20910-20910/arcane.com.athletesunited W/art﹕ Attempt to remove local handle scope entry from IRT, ignoring
07-24 16:09:05.109  20910-20910/arcane.com.athletesunited W/AwContents﹕ onDetachedFromWindow called when already detached. Ignoring
07-24 16:09:06.157  20910-20910/arcane.com.athletesunited W/BindingManager﹕ Cannot call determinedVisibility() - never saw a connection for the pid: 20910

这是我的傻瓜:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.0.0'
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.parse.bolts:bolts-android:1.+'
    compile fileTree(dir: 'libs', include: 'Parse-*.jar')
    compile 'com.google.android.gms:play-services:7.5.0+'
    compile 'com.google.maps.android:android-maps-utils:0.3+'
    compile 'com.facebook.android:facebook-android-sdk:4.1.0'
    compile fileTree(dir: 'libs', include: 'ParseFacebookUtilsV4-*.jar')
    compile 'com.android.support:support-v4:21.0.+'



}

和我的Java:

@Override
protected void onCreate(Bundle savedInstanceState) {

    FacebookSdk.sdkInitialize(getApplicationContext());
    Parse.initialize(findopp.this, "{APP_ID}", "{CLIENT_KEY}");
    ParseFacebookUtils.initialize(this);
    super.onCreate(savedInstanceState);

    setContentView(R.layout.activity_findopp);


 final List<String> permissions = Arrays.asList("public_profile");
    facebookbtn.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            FacebookSdk.sdkInitialize(getApplicationContext());

            ParseFacebookUtils.logInWithReadPermissionsInBackground(findopp.this, permissions, new LogInCallback() {
                @Override
                public void done(ParseUser user, ParseException err) {
                    if (user == null) {
                        Log.d("MyApp", "Uh oh. The user cancelled the Facebook login.");
                    } else if (user.isNew()) {
                        Log.d("MyApp", "User signed up and logged in through Facebook!");
                    } else {
                        Log.d("MyApp", "User logged in through Facebook!");
                    }
                }
            });
        }
    });

}

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    ParseFacebookUtils.onActivityResult(requestCode, resultCode, data);
}

0 个答案:

没有答案