Announcement Announcement Module
Collapse
No announcement yet.
How to get private posts Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to get private posts

    Hello,

    We have an API installed at clients that gives us permission to read the private messages, i.e. conversations. I can use the API restfb to get these but I was wondering if it is possible in any way to get the conversations using the Spring Social API?

    Greetings Tim Mickelson

  • #2
    If "private posts" means threads and messages in a user's inbox on Facebook, then no...Spring Social Facebook does not yet support those. But that is the topic of https://jira.springsource.org/browse/SOCIALFB-85 and now that you bring it up, I may try to work that in soon. Watch that issue in JIRA and you'll be notified when I get it done (and I invite you to help test it out in a snapshot build).

    If "private posts" means regular status updates that are just set with certain privacy settings, then that *should* work, so long as the user authorizing the application has authorization to see those posts. They should be able to see them through the same API binding methods as any other status update.

    Comment


    • #3
      Yes conversations is just that, the threads and messages in user's inbox.

      I can tell you that I actually managed to pull the private messages like this:

      List<Object> o = facebook.fetchConnections("me", "conversations", Object.class);

      But it's very ugly because it is hasmaps containing hasmaps and it is not very useful for me, it should be object like in the restfb api, where it would be a list of conversations List<Conversation>.

      Well thanks anyway, I'll use the Spring Social API for the rest, and restfb API for the private messages and I'll try to keep en eye on when the private messages will be available in Spring Social API.

      Comment


      • #4
        Completely understood on how the hashmaps of hashmaps isn't useful. But it doesn't have to be that way. Instead of asking for connections as Object.class, you could ask for it as a Conversation.class. (Conversation doesn't *yet* exist, but you could create such a thing, with the proper fields and maybe some Jackson annotations to guide in the deserialization.) That's what I'm going to end up doing when I implement it.

        Nonetheless, I shall be looking into this soon...probably later this week.

        Comment

        Working...
        X