敬錞 潘
敬錞 潘

Reputation: 852

Facebook get friend list issue in Unity

I use Graph API Explorer User Data Permissions and check "user_friends" ,

use FQL Query to fill in "/me/friends", I can get it below:

      {
        "data": [
          {
            "name": "xxx",
            "id": "750725034949941"
          }
        ],
        "paging": {
          "next": "https://graph.facebook.com/v2.2/1569963793218579/friends?limit=25&offset=25&          __after_id=enc_AexiIZhvUUA7W93CyCbEKqop8pgwMeZe0FVYg2fNQIrAxRs7nDvv1nuUG_aoKR8JOxUf29FXPlsfg9xVsGgDDToj"
        },
        "summary": {
          "total_count": 1
        }
      }

But I use Unity app to call FB.Login("user_friends,email,public_actions",callback);

then call FB.API("/me/friends")

I only get the result below:

{"data":[],"summary":{"total_count":1}}

How to modify C# code to get friendList detail?

Upvotes: 0

Views: 1550

Answers (1)

andyrandy
andyrandy

Reputation: 73984

That´s a new feature of v2.0: You only get the friends who authorized your App too. If no other friend authorized your App, data will be empty. Also, FQL is deprecated.

Upvotes: 3

Related Questions