Results 1 to 2 of 2

Thread: Facebook Auth Lightbox

  1. #1
    Join Date
    Nov 2012
    Posts
    1

    Default Facebook Auth Lightbox

    Hi,

    in case of access user's photos i need to open a iframe in my webpage.

    i use this to create the url:
    Code:
    FacebookConnectionFactory connectionFactory =
                        new FacebookConnectionFactory(clientId, secretKey);
    
                OAuth2Operations oauthOperations = connectionFactory
                        .getOAuthOperations();
                OAuth2Parameters params = new OAuth2Parameters();
                
                params.setRedirectUri(redirectUri);
                params.setScope("user_photos");
                facebookUploadRedirectURL = oauthOperations.buildAuthorizeUrl(
                        GrantType.AUTHORIZATION_CODE, params);
    If i use <iframe src="{facebookUploadRedirectURL}"/> the iframe unfortunately redirects the outer website to facebook.

    Any workaround here?

    A popup-window is not my preferred solution (because of popup-blocker).

  2. #2
    Join Date
    Aug 2004
    Posts
    1,075

    Default

    Interesting question. I've never considered doing the authorization within an iframe and (at least at this time) I do not have an answer for you. Perhaps some other members of the community have some insights.

    However, I've been thinking that doing the authorization in ways that does not redirect the browser away from the application is a desirable use-case. This could be as a new browser dialog, new DOM-based dialog, or in an iframe as you suggested. Although we already have a sample app that does this in a new browser dialog, there should be additional examples for doing it in a DOM-based dialog and in an iframe. Therefore, I've create https://jira.springsource.org/browse/SOCIAL-331 to track this as a task.

    If anyone reading this has any thoughts or successes to share, please share them on SOCIAL-331.
    Craig Walls
    Spring Social Project Lead

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •