Announcement Announcement Module
Collapse
No announcement yet.
Spring social Facebook empty messages Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring social Facebook empty messages

    Hello,

    Loving spring social so far, it is most useful. Perhaps someone can help with this problem I'm having:

    There are certain circumstances when the message of a POST or STATUS PostType is empty.
    A specific examples are when the current user posts directly to another users wall or when the user accepts a friend request. The second case makes sense, because there isn't much the message could say, but in this case the post is redundant because it doesn't give any information about the action that has occurred.

    Is this information stored elsewhere in a Post object or is it accessible from elsewhere (I'm using getHomeFeed())?
    Last edited by rolfharrison; Aug 28th, 2011, 02:43 AM. Reason: modified example

  • #2
    I'm not sure I'm able to recreate what you described...Here's what I did:

    - Using Facebook's test use facility, I created two test users (it gave me strange names for them, so I renamed them to Max and Chuck to make it easier to keep things straight).
    - I signed in to Facebook as Max, searched for Chuck, and added Chuck as a friend.
    - I signed out of Facebook and then in again as Chuck and confirmed the friend request.
    - Using FacebookTemplate.feedOperations().getHomeFeed() and an access token for each user, I checked the feed. There were not posts in either home feed just for adding a friend.
    - I then had Chuck write on Max's wall (through Facebook).
    - Once again, I checked the home feed via getHomeFeed(). This time, it pulled back one post in each home feed. And, the message field was not empty; it contained the message that Chuck wrote on Max's wall.

    So, I'm not sure what it is that you're seeing. Perhaps I'm not recreating the scenario fully. Are there any more details you can provide?

    Also, you might want to try fetching https://graph.facebook.com/me/home?access_token={token} through your browser (plugging in the access token for each user) to see what the resulting JSON looks like. Specifically, is there an post for the add-friend action? (If so, I'd really like to see that JSON). And does the message field contain the message you expected?

    Comment


    • #3
      Thanks for the reply Craig.

      I'm actually working with Android, I'm not sure if that makes a difference.
      The problem is reproducible using the showcase/sample on GitHub, I just need to confirm which posts are returning blank messages. Will try and do it with the test friend function you mentioned and report back...

      Comment


      • #4
        OK, I couldn't use the test users because the Facebook was throwing a 500 error when I used them.

        I release this might not actually be a bug with social, let me know if I should report it elsewhere. To replicate:
        clone: https://github.com/SpringSource/spring-android-samples
        build and install spring-android-showcase/client on your device
        login (I had to login as me)
        View the Home feed

        PostType's of STATUS show even if they are "likes", "event attendance", "friend acceptance". There are also some empty LINK types.

        Perhaps I am supposed to handle these empty message posts at my end with some logic?

        Comment


        • #5
          The thing that's tripping me up here is that you say the post type is STATUS when you know them to be "likes", "event attendance", "friend acceptance", etc. Are you saying that you've seen those types in the JSON coming back from FB? I ask because I've never seen those and the documentation doesn't list them as potential post types (which isn't surprising, because there are other post types that I know to exist that aren't documented). And when I've tested, setting up a friend acceptance scenario, I didn't even get a new entry in the feed.

          Would it be possible for you to fetch the JSON for https://graph.fracebook.com/me/home?access_token={your token} and post it here? (Feel free to edit it if you want to hide personal details...just leave the "type" field intact.

          Comment


          • #6
            I know what type of status update it is because I looked at my news feed after getting all the empty messages

            Attached a screenshot of Home feed in the Android showcase sample Attachment

            Also, JSON doesn't come into it at my end because as I'm using Java (http://static.springsource.org/sprin...ocs/1.0.x/api/)
            Interestingly, using the graph explorer with the link you provided doesn't show most of the posts I get...
            Attached Files

            Comment


            • #7
              I gotta say that I'm stumped on this one. I've tried everything I know to recreate it and I can't seem to get those other kinds of posts to show up in my home feed, even using the Android showcase sample. Every indication on my end and from the docs is that those kinds of items aren't posts and shouldn't show up in the home feed. Even your own tests with the Graph API Explorer don't show them.

              Also, if you look at the code that extracts the type, it should only choose STATUS if the type field is "status". If it were some unknown value in the type field, then it would fall back to the generic POST type.

              That said, I can't argue with what you're showing me here. If I only knew what JSON is being returned from Facebook when you hit it from the Android app, I might have something more to go on.

              I've also posted a question at http://facebook.stackoverflow.com/qu...-are-in-a-feed to see if I can get a more definitive answer on the types of posts to expect in a feed.

              Comment


              • #8
                Thanks Craig.

                Must be something to do with my setup (though that screenshot was from a fresh clone before my debug modifications were applied to getView so the code should be fine)

                I will investigate some more and report back (with that JSON if I still experience troubles)

                Comment

                Working...
                X