Results 1 to 4 of 4

Thread: Request for Help on spring-social-facebook and connection, also weird #_=_

  1. #1
    Join Date
    Mar 2011
    Posts
    13

    Default Request for Help on spring-social-facebook and connection, also weird #_=_

    I am a newbie trying to use spring social.

    I am using spring social 1.0.2.RELEASE with spring-social-facebook 1.0.1.RELEASE.

    I am seeing the following problems and also have few questions.

    From the JSP page I do the following:
    <form action="<c:url value="/connect/facebook" />" method="POST">
    <input type="hidden" name="scope" value="publish_stream,email" />
    <input type="hidden" name="redirect_uri" value="/portal"/>
    <div class="formInfo">
    <p>You aren't connected to Facebook yet. Click the button to connect Spring Social Showcase with your Facebook account.</p>
    </div>
    <p><button type="submit" value="Connect to Facebook"><img src="<c:url value="/resources/social/facebook/connect_light_medium_short.gif" />"/></button></p>
    <label for="postToWall"><input id="postToWall" type="checkbox" name="postToWall" /> Tell your friends about Spring Social Showcase on your Facebook wall</label>
    </form>


    I am seeing the following GET/POST in firebug.

    http://localhost:8080/site/connect/facebook

    https://graph.facebook.com/oauth/aut...stream%2Cemail

    Question: How is it picking up redirect_uri ?. where is this set ?


    https://www.facebook.com/dialog/perm...il&fbconnect=1

    http://localhost:8080/site/connect/f...?code=xxxx#_=_

    http://localhost:8080/site/connect/f...?code=xxxx#_=_


    http://localhost:8080/site/connect/facebook#_=_

    I got 500 internal server error for the last one (one above this)
    Question: what is the workflow of /connect/facebook ?. Where does it redirect after executing the above URL's and where to configure the URL to redirect to ?.

    Question: How to resolve the #_=_ issue ?

    Also, I got this stacktrace after the last URL executed,
    root cause

    java.lang.NullPointerException
    com.showcase.view.ResourceBundleExposingBeansViewR esolver.loadView(ResourceBundleExposingBeansViewRe solver.java:13)
    org.springframework.web.servlet.view.AbstractCachi ngViewResolver.createView(AbstractCachingViewResol ver.java:158)
    org.springframework.web.servlet.view.AbstractCachi ngViewResolver.resolveViewName(AbstractCachingView Resolver.java:77)
    org.springframework.web.servlet.DispatcherServlet. resolveViewName(DispatcherServlet.java:1078)
    org.springframework.web.servlet.DispatcherServlet. render(DispatcherServlet.java:1027)
    org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:817)
    org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:719)
    org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:669)
    org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:574)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:621)
    javax.servlet.http.HttpServlet.service(HttpServlet .java:722)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 328)
    org.springframework.security.web.access.intercept. FilterSecurityInterceptor.invoke(FilterSecurityInt erceptor.java:116)
    org.springframework.security.web.access.intercept. FilterSecurityInterceptor.doFilter(FilterSecurityI nterceptor.java:83)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 340)
    org.springframework.security.web.access.ExceptionT ranslationFilter.doFilter(ExceptionTranslationFilt er.java:95)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 340)
    org.springframework.security.web.session.SessionMa nagementFilter.doFilter(SessionManagementFilter.ja va:100)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 340)
    org.springframework.security.web.authentication.An onymousAuthenticationFilter.doFilter(AnonymousAuth enticationFilter.java:79)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 340)
    org.springframework.security.web.servletapi.Securi tyContextHolderAwareRequestFilter.doFilter(Securit yContextHolderAwareRequestFilter.java:54)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 340)
    org.springframework.security.web.savedrequest.Requ estCacheAwareFilter.doFilter(RequestCacheAwareFilt er.java:35)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 340)
    org.springframework.security.web.authentication.Ab stractAuthenticationProcessingFilter.doFilter(Abst ractAuthenticationProcessingFilter.java:187)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 340)
    org.springframework.security.web.authentication.lo gout.LogoutFilter.doFilter(LogoutFilter.java:105)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 340)
    org.springframework.security.web.context.SecurityC ontextPersistenceFilter.doFilter(SecurityContextPe rsistenceFilter.java:80)
    org.springframework.security.web.FilterChainProxy$ VirtualFilterChain.doFilter(FilterChainProxy.java: 340)
    org.springframework.security.web.FilterChainProxy. doFilter(FilterChainProxy.java:175)
    org.springframework.web.filter.DelegatingFilterPro xy.invokeDelegate(DelegatingFilterProxy.java:237)
    org.springframework.web.filter.DelegatingFilterPro xy.doFilter(DelegatingFilterProxy.java:167)


    Could you please kindly help me ?. thanks a lot
    Last edited by winssoc; Mar 24th, 2012 at 04:07 PM.

  2. #2
    Join Date
    Mar 2011
    Posts
    13

    Default

    I got past this error. It seems after the connection is done, it was redirecting to "connect/facebookconnected" and it was not defined in my spring mvc.

  3. #3
    Join Date
    Aug 2004
    Posts
    1,067

    Default

    Glad to hear you got past the problem.

    To answer the #_=_ question: As you can read at https://developers.facebook.com/blog/post/552/, that is appended to the callback URL by Facebook when some field is left blank. As for which field that is referring to...you'll notice that I left a comment asking about this, but never got a reply back, so I don't know. It seems harmless, but I wish I understood better what causes it to happen.
    Craig Walls
    Spring Social Project Lead

  4. #4
    Join Date
    Mar 2011
    Posts
    13

    Default

    thanks Habuma. Yes, its not clear from facebook thread for which field that's left blank, this error is thrown.

Posting Permissions

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