How do I get user likes along with categories

16 views
Skip to first unread message

Mohammad Tariq

unread,
Sep 26, 2016, 3:53:06 PM9/26/16
to Facebook4J
Dear fellow API users,

I am working on an iOS app that would use the users Facebook data to derive some insights. In order to do that we need to find out what are the things our users like. While browsing over the internet I came across facebook4j and found it to be really cool. I tried writing a small piece of code to see how exactly it works. Unfortunately it doesn't show me the desired results. This is the code which I am using :

FacebookFactory ff = new FacebookFactory(cb.build());

    Facebook facebook = ff.getInstance();

    try {

      System.out.println(facebook.getName());

      ResponseList<Like> userLikes = facebook.getUserLikes(facebook.getName());

      for (Like like : userLikes) {

        System.out.println(like.getName());

        System.out.println(like.getCategory());

      }

    } catch (FacebookException e) {

      e.printStackTrace();

    }


On some further digging I found out that Like.getName() and Like.getCategory(), which essentially means user_likes requires approval from Facebook. Is my understanding correct? 


I also tried raising a review request for my app and found out that it requires a whole bunch of things before the request gets submitted to Facebook. This includes privacy policy along with descriptive notes for individuals access request. I just want to test facebook4j API in my IDE and don't have the app at a stage where I can publish to app store or have a privacy policy attached to it. Is it really necessary? I mean, wouldn't it be too much just to test an API call? 


Thank you so much for your valuable time, and please pardon my ignorance as I am totally new to both app development + Facebook API.

Reply all
Reply to author
Forward
0 new messages