Java Code Examples for com.facebook.Session#getPermissions()
The following examples show how to use
com.facebook.Session#getPermissions() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StreamFragment.java From Klyph with MIT License | 6 votes |
private void handleDeleteCommentAction(Comment comment) { pendingDeleteComment = false; pendingComment = comment; Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); if (!permissions.containsAll(PERMISSIONS)) { pendingDeleteComment = true; requestPublishPermissions(session); return; } askDeleteComment(comment); pendingComment = null; }
Example 2
Source File: PostActivity.java From Klyph with MIT License | 6 votes |
private void handlePublishPost() { pendingAnnounce = false; Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); if (!permissions.containsAll(PERMISSIONS)) { pendingAnnounce = true; requestPublishPermissions(this, PERMISSIONS); return; } numTry = 0; publishPost(); }
Example 3
Source File: ImageFragment.java From Klyph with MIT License | 6 votes |
private void handleLikeCommentAction(final Comment comment) { pendingLikeComment = false; pendingCommentLike = comment; Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); if (!permissions.containsAll(PERMISSIONS)) { pendingLikeComment = true; requestPublishPermissions(session); return; } doLikeCommentAction(comment); pendingLikeComment = false; }
Example 4
Source File: ImageFragment.java From Klyph with MIT License | 6 votes |
private void handleReplyAction(final Comment comment) { pendingReplyComment = false; pendingCommentReply = comment; Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); if (!permissions.containsAll(PERMISSIONS)) { pendingReplyComment = true; requestPublishPermissions(session); return; } replyToComment(comment); }
Example 5
Source File: FacebookFragment.java From aws-mobile-self-paced-labs-samples with Apache License 2.0 | 5 votes |
/** * Gets the permissions associated with the current session or null if no session * has been created. * * @return the permissions associated with the current session */ protected final List<String> getSessionPermissions() { if (sessionTracker != null) { Session currentSession = sessionTracker.getSession(); return (currentSession != null) ? currentSession.getPermissions() : null; } return null; }
Example 6
Source File: FacebookFragment.java From platform-friends-android with BSD 2-Clause "Simplified" License | 5 votes |
/** * Gets the permissions associated with the current session or null if no session * has been created. * * @return the permissions associated with the current session */ protected final List<String> getSessionPermissions() { if (sessionTracker != null) { Session currentSession = sessionTracker.getSession(); return (currentSession != null) ? currentSession.getPermissions() : null; } return null; }
Example 7
Source File: StreamButtonBar.java From Klyph with MIT License | 5 votes |
private void handleDeleteAction(final IStreamHolder holder, final Stream stream) { pendingDelete = false; Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); if (!permissions.containsAll(PERMISSIONS)) { pendingDelete = true; requestPermissions(holder, stream, null); return; } doDeleteAction(holder, stream); }
Example 8
Source File: StreamButtonBar.java From Klyph with MIT License | 5 votes |
private void handleLikeAction(IStreamHolder holder, final Stream stream, final GraphObject subStream) { pendingLike = false; Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); if (!permissions.containsAll(PERMISSIONS)) { pendingLike = true; requestPermissions(holder, stream, subStream); return; } doLikeAction(holder, stream, subStream); }
Example 9
Source File: FacebookFragment.java From Abelana-Android with Apache License 2.0 | 5 votes |
/** * Gets the permissions associated with the current session or null if no session * has been created. * * @return the permissions associated with the current session */ protected final List<String> getSessionPermissions() { if (sessionTracker != null) { Session currentSession = sessionTracker.getSession(); return (currentSession != null) ? currentSession.getPermissions() : null; } return null; }
Example 10
Source File: PostPhotosActivity.java From Klyph with MIT License | 5 votes |
private void handlePublishPost() { pendingAnnounce = false; Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); if (!permissions.containsAll(PERMISSIONS)) { pendingAnnounce = true; requestPublishPermissions(this, PERMISSIONS); return; } publishPhotos(); }
Example 11
Source File: PreferencesActivity.java From Klyph with MIT License | 5 votes |
private void handleSetNotifications() { SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences.Editor editor = sharedPreferences.edit(); @SuppressWarnings("deprecation") CheckBoxPreference cpref = (CheckBoxPreference) findPreference("preference_notifications"); pendingAnnounce = false; final Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); if (!permissions.containsAll(PERMISSIONS)) { pendingAnnounce = true; editor.putBoolean(KlyphPreferences.PREFERENCE_NOTIFICATIONS, false); editor.commit(); cpref.setChecked(false); AlertUtil.showAlert(this, R.string.preferences_notifications_permissions_title, R.string.preferences_notifications_permissions_message, R.string.ok, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { requestPublishPermissions(session); } }, R.string.cancel, null); return; } editor.putBoolean(KlyphPreferences.PREFERENCE_NOTIFICATIONS, true); editor.commit(); cpref.setChecked(true); startOrStopNotificationsServices(); if (sharedPreferences.getBoolean(KlyphPreferences.PREFERENCE_NOTIFICATIONS_BIRTHDAY, false) == true) KlyphService.startBirthdayService(); }
Example 12
Source File: FacebookFragment.java From facebook-api-android-maven with Apache License 2.0 | 5 votes |
/** * Gets the permissions associated with the current session or null if no session * has been created. * * @return the permissions associated with the current session */ protected final List<String> getSessionPermissions() { if (sessionTracker != null) { Session currentSession = sessionTracker.getSession(); return (currentSession != null) ? currentSession.getPermissions() : null; } return null; }
Example 13
Source File: ImageFragment.java From Klyph with MIT License | 5 votes |
private void handlePostComment() { pendingAnnounce = false; Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); if (!permissions.containsAll(PERMISSIONS)) { pendingAnnounce = true; requestPublishPermissions(session); return; } postComment(); }
Example 14
Source File: Notifications.java From Klyph with MIT License | 5 votes |
private boolean hasPermissions() { Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); return permissions.containsAll(PERMISSIONS); }
Example 15
Source File: FacebookFragment.java From HypFacebook with BSD 2-Clause "Simplified" License | 5 votes |
/** * Gets the permissions associated with the current session or null if no session * has been created. * * @return the permissions associated with the current session */ protected final List<String> getSessionPermissions() { if (sessionTracker != null) { Session currentSession = sessionTracker.getSession(); return (currentSession != null) ? currentSession.getPermissions() : null; } return null; }
Example 16
Source File: FacebookFragment.java From KlyphMessenger with MIT License | 5 votes |
/** * Gets the permissions associated with the current session or null if no session * has been created. * * @return the permissions associated with the current session */ protected final List<String> getSessionPermissions() { if (sessionTracker != null) { Session currentSession = sessionTracker.getSession(); return (currentSession != null) ? currentSession.getPermissions() : null; } return null; }
Example 17
Source File: FacebookFragment.java From FacebookImageShareIntent with MIT License | 5 votes |
/** * Gets the permissions associated with the current session or null if no session * has been created. * * @return the permissions associated with the current session */ protected final List<String> getSessionPermissions() { if (sessionTracker != null) { Session currentSession = sessionTracker.getSession(); return (currentSession != null) ? currentSession.getPermissions() : null; } return null; }
Example 18
Source File: StreamFragment.java From Klyph with MIT License | 5 votes |
private void handlePostComment() { pendingAnnounce = false; Session session = Session.getActiveSession(); List<String> permissions = session.getPermissions(); if (!permissions.containsAll(PERMISSIONS)) { pendingAnnounce = true; requestPublishPermissions(session); return; } postComment(); }
Example 19
Source File: FacebookFragment.java From FacebookNewsfeedSample-Android with Apache License 2.0 | 5 votes |
/** * Gets the permissions associated with the current session or null if no session * has been created. * * @return the permissions associated with the current session */ protected final List<String> getSessionPermissions() { if (sessionTracker != null) { Session currentSession = sessionTracker.getSession(); return (currentSession != null) ? currentSession.getPermissions() : null; } return null; }
Example 20
Source File: FacebookFragment.java From android-skeleton-project with MIT License | 5 votes |
/** * Gets the permissions associated with the current session or null if no session * has been created. * * @return the permissions associated with the current session */ protected final List<String> getSessionPermissions() { if (sessionTracker != null) { Session currentSession = sessionTracker.getSession(); return (currentSession != null) ? currentSession.getPermissions() : null; } return null; }