问题
I'm probably doing something dumb but my attempts to access the BB Facebook functionality are failing. Here's the code (taken straight from the FB sample code provided):
String NEXT_URL = "http://www.facebook.com/connect/login_success.html";
String APPLICATION_ID = "app_id here";
String APPLICATION_SECRET = "secret_key here";
String[] PERMISSIONS = Facebook.Permissions.USER_DATA_PERMISSIONS;
ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS);
Facebook fb = Facebook.getInstance(as);
It falls over on the Facebook fb ... line.
Any pointers anyone?
回答1:
Grab all of the source - don't change any package names - and drop the trunk on a BB project.
Compile and run - it's a namespace problem.
It's a mistake to trust the suggested jar.
来源:https://stackoverflow.com/questions/8882973/blackberry-facebook-noclassdeffounderror