Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by jibrangillani11 · Aug 26, 2015 at 09:58 PM · unity 5photonfacebook

How to get facebook friends using playfab?

i have been trying to access the facebook friendlists of the facebook test users through playfab. am using this code

public void FriendLists(){

 GetFriendsListRequest request = new GetFriendsListRequest ();

 request.IncludeFacebookFriends = true;

 PlayFabClientAPI.GetFriendsList (request, GetFriends, FriendListError);

}

void GetFriends(GetFriendsListResult result){

 friends = result.Friends;
 Debug.Log("Friends");
 for(int i=0;i<friends.Count;i++){

     Debug.Log(friends[i].Username);


 }

I have saved the facebook app id and secret in playfab/setting/secret keys

All my test users are friends with each other

I have also logged in from the individual accounts to play fab.

but the friendlist still returns a null.

where am i going wrong?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
0

Answer by zac_playfab · Sep 17, 2015 at 09:14 PM

Hey Jibran, Your API request object seems to be setup correctly. I just ran the API internally and can confirm that the service seems to be operating correctly on our test title.

There are some App and Account settings on Facebook that could potentially impact your friends list. Please verify the following:

  1. Each account can selectively enable and disable what data it provides to an application. So for each account, confirm that under Facebook > Apps > Your App (should be registered under each of these accounts). Open the settings for your app and ensure that the account is set to provide the friends list.

  2. Your app is configured to access the needed account information. This can be checked in the Facebook app dashboard > Status & Review. The users_friends item should be green (Live and available to all useres)

  3. The client needs to specify the right permissions when obtaining the FB login token (via FB SDK): FB.Login("public_profile,email,user_friends", LoginCallback);

Here are the basic Facebook Docs on App permissions: https://developers.facebook.com/docs/facebook-login/permissions/v2.4#permission-email

Let me know if you are still having issues and I can take a deeper look. Any additional information you can provide will also help us determine what the root cause is.

Happy developing, -Zac

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

How to access ALL of a user's Facebook photos using the Facebook API? 0 Answers

How to enable the application events (sdk facebook). 0 Answers

Photon mirroring animation? 3 Answers

Unity Photon Get Room List 0 Answers

WebCamTexture conflicts with Facebook Audience Network - Unity SDK 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges