Note that there are some explanatory texts on larger screens.

plurals
  1. POBlackBerry forcefully interupt the facebook connect
    primarykey
    data
    text
    <p>I am using the following method to share my app data but if the user clicks back on the main screen, I would like it to forcefully close facebook connect.</p> <pre><code>public class FacebookIntegration { private static User user; private static String NEXT_URL = "http://www.facebook.com/connect/login_success.html"; private static String APPLICATION_ID ; private static String APPLICATION_SECRET ; private static String[] PERMISSIONS = Facebook.Permissions.USER_DATA_PERMISSIONS; public static boolean posted = false; private static String[] postPermissions = Facebook.Permissions.PUBLISHING_PERMISSIONS; private static SharePopup _obj; private static boolean exception = false; public static boolean integrate(SharePopup obj) { _obj = obj; ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS); ApplicationSettings as2 = new ApplicationSettings(null, APPLICATION_ID, APPLICATION_SECRET, PERMISSIONS); Facebook fb = Facebook.getInstance(as); _obj.close(); try { user = fb.getCurrentUser(); } catch (FacebookException e1) { e1.printStackTrace(); exception = true; } if (!exception) { try { fb.getCurrentUser(new BasicAsyncCallback() { public void onComplete(com.blackberry.facebook.inf.Object[] objects, final java.lang.Object state) { FacebookIntegration.this.user = (User) objects[0]; Vector prayerTimes = (Vector) PrayerTimesDTO.getPrayerTimes(); StringBuffer post = new StringBuffer("avbc"); user.publishStatus(post.toString()); posted = true; user.publishPost("stream.publish", "published through the Facebook API", APPLICATION_SECRET, null, null, null, user.getId()); } public void onException(final Exception e, final java.lang.Object state) { e.printStackTrace(); } }); } catch (FacebookException e) { e.printStackTrace(); } finally { fb.logout(true); } } return true; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload