I followed the next tutorial to integrate my application with Facebook. Facebook tutorial
I followed everything in the tutorial, but I got applicationId cannot be null in two cases, and it really upset.
My FacebookActivity onCreate has the following, which is exactly the same as the tutorial:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); uiHelper = new UiLifecycleHelper(this, callback); uiHelper.onCreate(savedInstanceState); setContentView(R.layout.main_fb); FragmentManager fm = getSupportFragmentManager(); fragments[SPLASH] = fm.findFragmentById(R.id.splashFragment); fragments[SELECTION] = fm.findFragmentById(R.id.selectionFragment); FragmentTransaction transaction = fm.beginTransaction(); for(int i = 0; i < fragments.length; i++) { transaction.hide(fragments[i]); } transaction.commit(); }
However, when I try to display the action, I get applicationId cannot be null , and the LogCat line points me to: uiHelper.onCreate(savedInstanceState);
So, I tried to comment on this line, and the activity is displayed. However, now when I click on LoginButton , I get the same error, but this time I specify the applicationId field in the LoginButton class from facebook.
I already have an Id in my string values, and my manifest looks like this:
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/APP_ID"/>
I tried to get the code using the id, but nothing changed.
What exactly causes all this?
android facebook
Ali Alamiri Apr 22 '13 at 21:15 2013-04-22 21:15
source share