facebook android sdk Authentication error

vito

New Member
I ask about facebook android sdk Authentication error.When I rnu the program, it appear an error is "has stopped unexpectedly. Please try again ."debuge error is about NullPointerException problem.(facebook-android-sdk / facebook / src / com / facebook / internal / Validate.java)How can I solve this problem? thanks.\[code\]package com.example.fbloginau;import android.os.Bundle;import android.support.v4.app.Fragment;import android.support.v4.app.FragmentActivity;public class MainFragment extends FragmentActivity {private Fragment Fragment;public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (savedInstanceState == null) { // Add the fragment on initial activity setup Fragment = new Fragment(); getSupportFragmentManager() .beginTransaction() .add(android.R.id.content, Fragment) .commit(); } else { // Or set the fragment from restored state info Fragment = (Fragment) getSupportFragmentManager() .findFragmentById(android.R.id.content); }} }\[/code\]\[quote\] Blockquote\[/quote\]\[code\]<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"android:layout_width="match_parent"android:layout_height="match_parent"android:orientation="vertical"><com.facebook.widget.LoginButton android:id="@+id/authButton" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_horizontal" android:layout_marginTop="30dp" />\[/code\]\[quote\] Blockquote\[/quote\]\[code\]enter code here\[/code\]
 
Back
Top