Announcement Announcement Module
Collapse
No announcement yet.
[Announce] Spring Social Hybrid Canvas App... if anyone interested Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [Announce] Spring Social Hybrid Canvas App... if anyone interested

    I forked Spring Social Samples, and based on the spring social canvas app and the spring social showcase app I combined some ideas from both and made a new one. For lack of a better name I called the sample "spring-social-hybrid-canvas" (I really need a better name.)

    https://github.com/rickcr/spring-soc...-hybrid-canvas

    From the README

    * Purpose of this app is to combine some of the features of the Spring Social Showcase with the typical behavior
    you'd also expect when working with a facebook canvas app in an iframe. In a current project we have to integrate
    with we aren't using SpringSecurity, so this application also doesn't use SpringSecurity. It uses a simple
    SecurityService class. (Doesn't rely on the cookie based approach of the basic spring social app or spring
    social canvas.)


    * IMPORTANT* currently this app resuses the facebook application setup for 'springsocialcanvas'
    For this reason this app builds a war called spring-social-canvas.war
    The URL is thus http://apps.facebook.com/springsocialcanvas

    * Build and run:
    Build with maven: mvn clean install
    Deploy target/spring-social-canvas.war to Tomcat 6 (or greater) and start tomcat
    Access the project via Facebook at http://apps.facebook.com/springsocialcanvas.
    (For nix users there is a buildAndDeploy script that will build, stop tomcat, clean Tomcat temp dirs,
    clean logs, deploy app, start tomcat - I know I should use the tomcat plugin - lazy for now

    * logging set up (with log4j.xml and spring using sl4j) *NOTE* Can someone help me configure it correctly.
    You'll see Tomcat errors if you have two wars set up like this with logging done the same way. I'm sure it's
    related to my spring logging declaration in the web.xml?

    * Like the spring social canvas app, this one attempts to sign you in automatically with facebook.
    It differs though, in that it doesn't rely on the cookie stuff and it also does display a signin/singup form
    if your real account hasn't been associated with facebook yet. (Like spring social canvas 'disconnect from facebook'
    isn't provided either since this app is supposed to be used within a logged in facebook account.)

    * Uses tiles like spring-social-showcase

    * Uses a modified UserInterceptor like spring-social-canvas

    * Various other changes were made within the application to merge some of the concepts of Spring Social Showcase
    and the spring social canvas app.

    * I'm still pretty new to using spring mvc so I could have set things up in ways that I shouldn't - so please let
    me know of any mistakes. All suggestions are welcome.

    * I know.. no unit tests yet or anything. TODO

  • #2
    This sounds interesting. I'll have a look and let you know what I think.

    Based on my experience as a user of Facebook Canvas apps (admittedly small, as I don't play many FB games or answer silly "What Twilight character are you?" surveys), I think the existing canvas sample follows the more typical sign in flow, simply relying solely on the user's FB identity and signin. But I can also see where your approach of having a secondary app-specific signup would be useful in some cases. Therefore, I think both approaches are valid and it really boils down to the specific requirements of the application.

    Comment


    • #3
      Originally posted by habuma View Post
      Based on my experience as a user of Facebook Canvas apps (admittedly small, as I don't play many FB games or answer silly "What Twilight character are you?" surveys), I think the existing canvas sample follows the more typical sign in flow, simply relying solely on the user's FB identity and signin. But I can also see where your approach of having a secondary app-specific signup would be useful in some cases. Therefore, I think both approaches are valid and it really boils down to the specific requirements of the application.
      Right, I agree that most facebook canvas apps will certainly follow the approach you described.

      However, there will be cases (such as my real-life work case) where a company wants to take an existing web site and move it over 'into' facebook. Take for instance a site that might let users signup and answer survey questions about what restaurants they visit (just as an example.) Users complete some surveys and they can win free gift cards or whatever. This site might already exist as a non-facebook app, and when signing up the site likes to gather useful demographic information that it can use to help in marketing (eg "60% of Hispanic women 18-30 answered they frequent Olive Garden once a month.") Companies moving some apps to facebook will want to still correlate their existing user base to the facebook version of the app and if they haven't signed up they'll need to gather some more demographic information than facebook makes available. (I think I'll illustrate this latter point in the demo by providing a form question "such as how many cars do you own?" to the sign up form.)

      Not related to the canvas aspect per-se, but the other thing this app might be useful for is for people wanting an example not using Spring Security but want an example with something a little more robust than the cookie approach in the basic social samples. (This was actually the first thing I needed to tackle since in our app we have to hook into an existing authentication scheme already in place.)

      Comment

      Working...
      X