Search in sources :

Example 31 with Session

use of com.facebook.Session in project Klyph by jonathangerbaud.

the class PostActivity method handlePublishPost.

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();
}
Also used : KlyphSession(com.abewy.android.apps.klyph.core.KlyphSession) Session(com.facebook.Session)

Example 32 with Session

use of com.facebook.Session in project Klyph by jonathangerbaud.

the class EventFragment method handleResponseClick.

private void handleResponseClick(int request) {
    pendingAnnounce = false;
    Session session = Session.getActiveSession();
    List<String> permissions = session.getPermissions();
    if (!permissions.containsAll(PERMISSIONS)) {
        pendingAnnounce = true;
        pendingRequest = request;
        requestPublishPermissions(session);
        return;
    }
    sendRequest(request);
}
Also used : Session(com.facebook.Session)

Example 33 with Session

use of com.facebook.Session in project Klyph by jonathangerbaud.

the class Notifications method hasPermissions.

private boolean hasPermissions() {
    Session session = Session.getActiveSession();
    List<String> permissions = session.getPermissions();
    return permissions.containsAll(PERMISSIONS);
}
Also used : Session(com.facebook.Session)

Example 34 with Session

use of com.facebook.Session in project Klyph by jonathangerbaud.

the class ImageFragment method handleReplyAction.

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);
}
Also used : KlyphSession(com.abewy.android.apps.klyph.core.KlyphSession) Session(com.facebook.Session)

Example 35 with Session

use of com.facebook.Session in project Klyph by jonathangerbaud.

the class StreamFragment method handlePostComment.

private void handlePostComment() {
    pendingAnnounce = false;
    Session session = Session.getActiveSession();
    List<String> permissions = session.getPermissions();
    if (!permissions.containsAll(PERMISSIONS)) {
        pendingAnnounce = true;
        requestPublishPermissions(session);
        return;
    }
    postComment();
}
Also used : KlyphSession(com.abewy.android.apps.klyph.core.KlyphSession) Session(com.facebook.Session)

Aggregations

Session (com.facebook.Session)47 KlyphSession (com.abewy.android.apps.klyph.core.KlyphSession)16 Response (com.facebook.Response)6 FacebookException (com.facebook.FacebookException)5 Request (com.facebook.Request)5 GraphUser (com.facebook.model.GraphUser)5 FacebookAuthorizationException (com.facebook.FacebookAuthorizationException)4 FacebookOperationCanceledException (com.facebook.FacebookOperationCanceledException)4 SessionState (com.facebook.SessionState)4 UnsupportedEncodingException (java.io.UnsupportedEncodingException)4 JSONException (org.json.JSONException)4 Bundle (android.os.Bundle)3 SpannableString (android.text.SpannableString)3 FacebookDialogException (com.facebook.FacebookDialogException)3 FacebookServiceException (com.facebook.FacebookServiceException)3 GraphUserCallback (com.facebook.Request.GraphUserCallback)3 FacebookRequestError (com.facebook.FacebookRequestError)2 GraphUserListCallback (com.facebook.Request.GraphUserListCallback)2 SessionTracker (com.facebook.internal.SessionTracker)2 GraphObject (com.facebook.model.GraphObject)2