06-11-2012 01:56 AM
I am using Blackberry Facebook SDK (FacebookBlackBerrySDK-v0.8.25.jar) for facebook integration for my app. I am using the following code.
ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS);
Facebook fb = Facebook.getInstance(as);
try{
FBUserDetails fbUserDetails = FBUserDetails.getInstance();
String prevUserDatails = fbUserDetails.getFBData();
User user = fb.getCurrentUser();
if(prevUserDatails != null && !prevUserDatails.equals("") && user.getEmail().equals(prevUserDatails)){
if(Dialog.ask(Dialog.D_YES_NO,"Do you want to post using FB account " + prevUserDatails + "?",Dialog.YES)==Dialog.NO){
fb.logout(true);
user = fb.getCurrentUser();
}
}
if(user!= null){
fbUserDetails.persist(user.getEmail());
String result = user.publishStatus(decodedText);
if ((result != null) && !result.trim().equals("")) {
Dialog.alert("Successfully posted to Facebook.");
} else {
Dialog.alert("Share Failed.");
}
}else
Dialog.alert("user is equal to null.");
}catch(FacebookException fe){
fe.printStackTrace();
}
When I am testing the app in Blackberry Strom 9300 (OS version 6.0.0.526), it is running properly first time. But when I am going to share any text again, system is giving "the memmory available on your device is low. Close some of the items below." and I forced to close the application. Can anyone tell me what is the problem in the above code?
06-13-2012 08:16 AM
I have identifies that I am going to share the same text again in a short interval(it is obvious that the posting will fail), system is giving "the memmory available on your device is low. Close some of the items below." and I forced to close the application.
06-13-2012 10:51 AM
You wont face the issue in the device.. Try deploying n check!!
06-14-2012 01:17 AM
I am testing in teh device only, I have tried more than one device(both in OS 6 and OS 7) and faced the prob.