Announcement Announcement Module
Collapse
No announcement yet.
Which operations methods return likes? for games, sports, athletes, etc ??? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Which operations methods return likes? for games, sports, athletes, etc ???

    I'm trying to retrieve facebook user information such as games, favorite athletes, sports etc.

    In the graph api explorer they show up under "games" and the rest under "likes"

    However I'm not able to find what API call returns these things. I figured they would be found under LikeOperations but that doesn't seem to be the case.

  • #2
    The "games" connection is relatively new to Facebook's Graph API and isn't covered by Spring Social Facebook's API binding yet. It does make the most sense to have it in LikeOperations. I've created https://jira.springsource.org/browse/SOCIALFB-35 to track this.

    As for favorite athletes, sports, etc...I see no such connection for those. They just fall under "likes" as you found out with the Graph API.

    Comment


    • #3
      Originally posted by habuma View Post
      The "games" connection is relatively new to Facebook's Graph API and isn't covered by Spring Social Facebook's API binding yet. It does make the most sense to have it in LikeOperations. I've created https://jira.springsource.org/browse/SOCIALFB-35 to track this.
      Cool. Thanks

      Originally posted by habuma View Post
      As for favorite athletes, sports, etc...I see no such connection for those. They just fall under "likes" as you found out with the Graph API.
      But how do you retrieve these "likes" with SpringSocial? "likes" according to the API seems different - looks like it gets you users who have liked the object you provide instead of a list of the likes you'd see using the graph api:

      From the API docs:
      java.util.List<Reference> getLikes(java.lang.String objectId)
      Retrieves a list of references to users who have liked the specified object.

      Thanks again

      Comment


      • #4
        The getLikes() method, as you pointed out, takes an Object ID and returns a list of users who have liked that object. To get the things that a user has liked, you should use getPagesLiked(). With no arguments, it gets a list of Page objects for the objects that the authenticated user has liked or you can pass in a user ID to get that user's likes.

        In case it's unclear, the reason it returns a list of Page objects is because ultimately almost every object on Facebook is represented by a Page. So, when you "like" a television show, restaurant, or whatever, you're really liking the page that represents that object.

        Comment

        Working...
        X