1

I am trying to retrieve all pages a user has liked on Facebook in my app. Taking from the Graph API, here is my code:

 let request3 = FBSDKGraphRequest(graphPath: "/me/likes", parameters: ["fields": "id,name,picture, user_likes"])
            request3.startWithCompletionHandler({ (connection3, result3, erreur3) -> Void in
                if erreur3 == nil {
                    print(result3)
                }
                else {
                    print(erreur3)
                }
            })

this code yields this:

     {
   data =     (
   );
}

I also tried "me/likes", and it gave me the same empty data set. I tried some of the answers here Facebook Graph API - likes returns me an empty set as well but none of those worked.

I have the "user_likes" permission, and I have a valid AccessToken as well.

Also, I have set my Facebook likes to public, so I know they aren't being hidden because of privacy settings. Any idea how to get the user likes?

thanks

Community
  • 1
  • 1
jjjjjjjj
  • 4,203
  • 11
  • 53
  • 72

1 Answers1

1

See this is screenshot i got data .. if you have don't permission on graph explore then you don't get any result..

in a development you add permission on graph explorer then after when you live your app you need to submit your app for permission.

if you have any query then tell me i will help you.

Maulik shah
  • 1,664
  • 1
  • 19
  • 45
  • yep, I think this was the problem. Because using the graph Explore I can get the data I need. But I don't get it--I have to wait until my app is live to be able to actually retrieve this through my app in Xcode? But I need this code in order to make it live in the first place. What is the normal order of doing this? thanks a lot for showing me the graph explore by the way! – jjjjjjjj Nov 27 '15 at 05:24
  • @joey: You can ask any user with a role in the app (admin/developer/tester) for any permission without review. – CBroe Nov 30 '15 at 15:50