Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 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 grofie · Apr 16, 2014 at 09:31 AM · facebook

Facebook API returning always empty data

I am trying to use some picures from facebook inside my unity project. The project is setup right, I can login, receive the friend list and can upload pictures. But the following API call always return an empty data object:

 // get all albums
 FB.API("me/albums?fields=id", Facebook.HttpMethod.GET, GetAllAlbumsCallback);
 
 // or get all pictures
 FB.API("me/pictures?fields=id", Facebook.HttpMethod.GET, GetAllAlbumsCallback);

The result is always

 {"data":[]}

without any errors. When I try the same API calls in the Graph API Explorer, I get the IDs as expected. I am also using the user_photos permission, which seems to work in general since I can upload pictures.

Anybody ran into the same problem and knows a work arround?

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 vuha.1028 · Jun 27, 2014 at 08:30 AM

You have to set permission "user_photos" to access to album of you and your friends

Comment
Add comment · Show 3 · 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
avatar image grofie · Jun 27, 2014 at 10:03 AM 0
Share

Please read more carefully, doing that already:

I am also using the user_photos permission, which seems to work in general since I can upload pictures.

avatar image VamshiKrishnaP · Dec 18, 2014 at 09:43 AM 0
Share

How to get user_photos permissions to upload a photo from my application ?

by default, facebook is not giving access for user_photos.

Thank you.

avatar image grofie · Dec 19, 2014 at 08:16 AM 0
Share

You get the permissions when logging in to facebook, i.e.:

 FB.Login("user_photos", LoginCallback);
 

Source. At the end of this page, you can also find an example of how to check your permissions inside the app (i.e. to log and check):

 FB.API("/me/permissions", Http$$anonymous$$ethod.GET, delegate (FBResult response) {
   // inspect the response and adapt your UI as appropriate
   // check response.Text and response.Error
 });

For me it did not work for a while because the debug tokens got mixed up somehow. In the browser I had all necessary permissions, in my app I did not. I reset the tokens and it finally worked in the app too.

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

21 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to share high score(string)/game result data on facebook ...please any one help me ....:(. 2 Answers

FB.Feed() "properties" argument not working as expected 0 Answers

Facebook sdk cancelled login crash 3 Answers

Facebook SDK - Send lives between users - FB.API() problem 2 Answers

Game crashing after sharing post on facebook 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