Announcement Announcement Module
Collapse
No announcement yet.
Facebook Auth Lightbox Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment

    Working...
    X