Announcement Announcement Module
Collapse
No announcement yet.
Anyone know what setting or what I need to do to not have the top facebook bar show? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Anyone know what setting or what I need to do to not have the top facebook bar show?

    I'm trying to move things to a popup, but regardless of whether I use the new enhanced auth dialog or the older one, I end up with an annoying top facebook bar which ends up not looking good if you want to fit your stuff in a popup. I want to know how to remove the top bar circled in red here:

    https://skitch.com/rickcr/gjqrj/request-for-permission

    and instead have it look like the ones I'm used to seeing like in the popup social dialog:

    https://skitch.com/rickcr/gjqr4/request-for-permission

    I figured maybe it's a setting on the facebook app side but didn't see it. (Google didn't help me much either so figured I'd try asking here.)

  • #2
    Have you tried passing display=popup as a parameter to the dialog? This is documented by Facebook at https://developers.facebook.com/docs...ialogs#display and you can see it in the Spring Social Popup example in PopupDialogConnectInterceptor.java.

    Comment


    • #3
      Ahh excellent point. I DO have that but in my Connect interceptor but what I'm working on now is a signin attempt so I'll have to add it somewhere for a signin attempt. Thanks!

      Comment


      • #4
        Looks like ProviderSignInController could also use a preSignIn interceptor similar to ConnectController.

        Issue is the standard providerSignin doesn't look like it allows for additional parms to be passed:

        Code:
        @RequestMapping(value="/{providerId}", method=RequestMethod.POST)
        public RedirectView signIn(@PathVariable String providerId, NativeWebRequest request) {
        	ConnectionFactory<?> connectionFactory = connectionFactoryLocator.getConnectionFactory(providerId);
        	return new RedirectView(webSupport.buildOAuthUrl(connectionFactory, request));
        }
        where it's calling websSupport to build it passing in null for additional params:

        Code:
        public String buildOAuthUrl(ConnectionFactory<?> connectionFactory, NativeWebRequest request) {
        	return buildOAuthUrl(connectionFactory, request, null);
        }

        Comment


        • #5
          In case someone gets here searching. I modified the core ProviderSignInController to have protected access to its members, then extended ProviderSignInController which now has the following two methods in my code:

          Code:
          //Used in cases where user hits cancel during auth process
          // Should this be in core possibly - with a "declinedAuthUrl" param that could be set?
          @RequestMapping(method = RequestMethod.GET)
          public RedirectView signIn() throws Exception {
          	return new RedirectView("/", true);
          }
          
          @Override
          public RedirectView signIn(@PathVariable String providerId, NativeWebRequest request) {
          	ConnectionFactory<?> connectionFactory = connectionFactoryLocator.getConnectionFactory(providerId);
          	MultiValueMap<String, String> parameters = new LinkedMultiValueMap<String, String>();
          	//we want a popup
          	parameters.add("display","popup");
          	return new RedirectView(webSupport.buildOAuthUrl(connectionFactory, request,parameters));
          }

          Comment


          • #6
            Just as an additional note: In case you don't want to patch the ProviderSignInController, which would be necessary in order to get access to the private members as mentioned in the previous post, you may as well simply extend it and override the signin method as follows:

            Code:
            @Override
                public RedirectView signIn(@PathVariable String providerId, NativeWebRequest request) {
                    RedirectView redirectView = super.signIn(providerId, request);
                    redirectView.addStaticAttribute("display", "popup");
                    return redirectView;
                }

            Comment


            • #7
              this is very interesting information, thank you

              Comment

              Working...
              X