Announcement Announcement Module
Collapse
No announcement yet.
Facebook: Unexpected graph API exception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Facebook: Unexpected graph API exception

    Hi,

    For some facebook users, I get this error:

    Code:
    class org.springframework.social.facebook.api.GraphAPIException: Unexpected graph API exception
    org.springframework.social.facebook.api.impl.FacebookTemplate.fetchObject(FacebookTemplate.java:170)
    org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:36)
    org.springframework.social.facebook.api.impl.UserTemplate.getUserProfile(UserTemplate.java:32)
    org.springframework.social.facebook.connect.FacebookApiAdapter.setConnectionValues(FacebookApiAdapter.java:42)
    org.springframework.social.facebook.connect.FacebookApiAdapter.setConnectionValues(FacebookApiAdapter.java:30)
    org.springframework.social.connect.support.AbstractConnection.setValues(AbstractConnection.java:172)
    org.springframework.social.connect.support.AbstractConnection.initKey(AbstractConnection.java:135)
    org.springframework.social.connect.support.OAuth2Connection.<init>(OAuth2Connection.java:71)
    org.springframework.social.connect.support.OAuth2ConnectionFactory.createConnection(OAuth2ConnectionFactory.java:58)
    after receiving the code from facebook, when I do that:

    Code:
    Connection<FacebookApi> connection = connectionFactory.createConnection(accessGrant);
    It looks like FacebookTemplate.fetchObject() tries to get something from the facebook profile that makes it fail, so I tried to compare 2 facebook accounts, (one that works and the other one that doesn't) but I don't see what could be the difference that makes the code break for 1 of them...

    Any idea?

    Thanks!

  • #2
    Without seeing the rest of the stack trace, I can't be sure, but the symptoms sound the same as what is described in http://forum.springsource.org/showth...-fb-users-only.

    This is a known bug in M3 and has been fixed in the latest snapshot builds. If you're getting this error with M3, then try out the snapshot build and see if that corrects the problem for you. If you're getting this error in a snapshot, then it must be a different problem...let us know and we'll get it taken care of. Thanks!

    Comment


    • #3
      Hi habuma,

      The rest of the stack trace is from my stuff, the following item in the stack is about:
      Connection<FacebookApi> connection = connectionFactory.createConnection(accessGrant);
      in my controller.

      Just to be sure, to use the snapshot build I just have to add the snapshot repository and do something like:
      Code:
      <dependency>
      	<groupId>org.springframework.social</groupId>
      	<artifactId>spring-social-facebook</artifactId>
      	<version>1.0.0.BUILD-20110518.133920-175</version>
      </dependency>
      right?

      Because when I do that I get an error, FacebookApi is not found. (whereas I see that the dependancy "spring-social-facebook-1.0.0.BUILD-20110518.133920-175" has been dowloaded in my local repository)

      Thanks.

      Comment


      • #4
        You need the latest, but need to update references to FacebookApi to Facebook (the classname has changed).

        Comment


        • #5
          So I used the last core and the last facebook dependencies and it seems to work.

          Thank you for your help.

          By the way when do you guys plan to release the next milestone including this fix?

          Comment


          • #6
            The target for release is late next week. No guarantees of course, but we're aiming to move to 1.0 final soon now.

            Comment

            Working...
            X