Announcement Announcement Module
No announcement yet.
Canvas is called everywhere Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Canvas is called everywhere

    When I call the url of the app, it opens the facebook login page with the app loaded on the main page.

    It not opens the auth dialog, just load the app.

    Help-me please.

  • #2
    Help me understand better what it is you're doing. What do you mean by "the url of the app"? What app? What URL?

    If you're saying that triggering the Spring Social connection flow takes you to Facebook's login page, that may be perfectly normal. The first step in an OAuth 2 authorization flow is to redirect the application to the provider's (e.g., Facebook's) authorization page. If the user hasn't yet logged into Facebook, then the first thing they'll see is the Facebook login page. After logging in, they'll be shown Facebook's authorization page.

    To be clear, however, it is a *redirect* and so it is expected to be loaded in the main browser window and not in a dialog. There are ways to get it in a dialog, but they require a bit more clever coding...or, in the case of Facebook, there are some Javascript-based dialog options, but those are not yet directly supported by Spring Social (there may be ways to make them work, but there's nothing official in place yet. There's a task to attempt to get these to work together, but I've not addressed it yet.)


    • #3
      Thanks a lot!

      When I call the facebook page is loaded, but inside the login form of the facebook the application is opened.

      So, the app is loaded until I log to the facebook.


      • #4
        I see. So, what I missed is that this is a Facebook Canvas application. In that case, Spring Social's connection flow isn't required (although I do have an example that uses it, it's not really the right way to do things and I do intend to fix that).

        The right thing to do is to pull the access token from the signed request that Facebook will POST to your application. This is the subject of I need to update that sample to use the signed request. As I do that, I may uncover some improvements to properly hand off the token to the connection framework to create connections...but at the moment, that is left up to you.

        This is definitely on my TODO list. If you're interested you should watch that issue...and if you're inclined, then I welcome you to try to adapt the example and submit a pull request. Specifically, you're going to want to look to SignedRequestDecoder to help you get the access token and then hand it off to the connection repository to create a connection.


        • #5

          In another app that I created I have no problems with this. And I think I'm not ready to do what you explain. But I will look for something. SO can you show me how I must to start?