Announcement Announcement Module
Collapse
No announcement yet.
Request for Help on spring-social-facebook and connection, also weird #_=_ Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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, 04:07 PM.

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

    Comment


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

      Comment


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

        Comment


        • #5
          I have been using the spring social showcase for my project. It was all working fine but suddenly, I am getting this "#_=_" appended in the URL. After logging into Facebook, it should redirect me to the page facebookconnected, but it's not working.
          So, the URL before connecting to Facebook is: http://localhost:8084/social-network...nnect/facebook
          After logging in: http://localhost:8084/social-network...t/facebook#_=_
          Which is correct, but I am not getting the left navigation stuffs and it's the same as it was before logging in.
          If I run the original spring social showcase, it's working absolutely fine. Even here, I have this phrase appended at the end of URL but it's working fine.

          I have tried many things but it's just not working, I tried googling as well but didn't come up any solution. At last, I tried pasting the entire pom.xml and all other files which might be related to this issue but it is still not working.

          Comment


          • #6
            Spring Social Facebook does not retrieve age_range from FAcebook. This is supposed to be one of the public profile permissions

            Comment

            Working...
            X