08-21-2011 06:32 AM - edited 08-21-2011 09:55 AM
Dear BlackBerry Developers,
I am developing an application where users will be able to login with their Facebook accounts and their names-surnames, gender and e-mail info will be used by the application. I was looking for a simple solution, and came accross Facebook BlackBerry SDK v0.8.24. However, I could not manage to login and get the information.
I read the README.pdf file and completed the steps, however could not even log in. Below is the code I'm using:
public MyScreen()
{
setTitle("MyTitle");
String NEXT_URL = "http://www.facebook.com/connect/login_success.html";
String APPLICATION_ID = "113365482097876";
String APPLICATION_SECRET = "xxxyyyzzz4fa1ad46af9ced88943d222";
String[] PERMISSIONS = Facebook.Permissions.USER_DATA_PERMISSIONS;
ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS);
Facebook fb = Facebook.getInstance(as);
try {
User user = fb.getCurrentUser();
setTitle(user.getFirstName());
} catch (FacebookException e) {
e.printStackTrace();
setTitle(new LabelField("Error Encountered", LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH));
add(new LabelField("Exception: " + e.getMessage()));
}
}
When I am running this program on the simulator, the simulator starts with: JVM Error 104: Uncaught: Runtime Exception. Then, after skipping that and running the application, it says: Exception: Unable to refresh the access token.
I am really frustrated with this and need help. Thanks in advance.
08-21-2011 06:32 PM
Please give us more information as to which versions of JDE/Eclipse and simulator you are using.
Cheers.
EB
08-22-2011 02:30 AM
If you could provide a link to the SDK you're using as well, it could be severely outdated.
Also, it's probably noteworthy that people have been posting about problems within the Facebook SDK, see here (for a potential solution):
http://supportforums.blackberry.com/t5/Java-Develo
08-22-2011 05:01 AM - edited 08-22-2011 05:04 AM
Hi,
I am using BlackBerry Java Plug-in for Eclipse Version: 1.3.0
and BlackBerry Smartphone Simulator 2.13.0.108
I had downloaded the version FacebookBlackBerrySDK-0.8.24-bin.zip
Best regards,
burakk
08-22-2011 09:15 AM
Have you tried using the latest release (0.8.25)?
Cheers.
EB
08-22-2011 09:49 AM
Yes, unfortunately I'm still getting the same error. What would you suggest me to look at first? Thanks in advance
Teşekkürler ![]()
08-24-2011 09:43 AM
You can try the following:
If all fails you may want to run in debug mode and see what's printed in the Console.
Cheers.
EB
09-26-2011 02:37 PM - edited 09-26-2011 02:55 PM
I got it working, thanks...
01-01-2012 10:37 AM
Hello,
I am having the same problem, how did you fixed it?
04-03-2012 05:34 AM
Hi,
I am getting the same problem and search a lot for that problem but I am unable to fix that issue.
Please post the solution. So that i can solve the problem and other can also get the solution