简体   繁体   中英

how to use facebook sdk to sign in on an Android phone?? (error= applicationID is null)

I can't figure out why I keep getting a null pointer exception ("applicationID cannot be null"). My code looks almost identical to this. The only part I don't use is the "welcome text"

https://developers.facebook.com/docs/getting-started/facebook-sdk-for-android/3.0/

I set up an app on the Facebook developers page and then define the ID in the manifest as meta-data, as instructed in the Facebook tutorials. more specifically, I define the app by including a reference to my strings (strings/appID), and in the strings.xml, I actually define the string (really long number). I'm pretty sure this part is correct!

I also added a reference to the "LoginActivity" class (located in the Facebook SD) to my own app's manifest, as suggested by this tutorial

do I need to pass the applicationID anywhere to the Session? that's the last thing I can think of but unfortunately I have not been successful

any help would be greatly appreciated. I really don't know what else to change so my app recognizes the applicationID!

Thanks!

I having similar problem. Do not put appId directly in manifest, place here only reference to @strings , and put id to @strings . There problem with big integers in manifest, and appId looks as big integer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM