Facebook API get friend albums not working for some friends

走远了吗. 提交于 2019-12-12 18:13:17

问题


I'm using the following FQL query

'select src,src_big from photo where aid in(select aid from album where owner=' + contactId + ' and type="profile")'

But it works for about 50% of my friends, and the rest - it doesn't. Its not a permissions problem because the behavior persists per friend, if it works for a friend - it always works for him.

  1. Is this a Facebook thing, where a user can choose to prevent apps from getting his photos? (like what happens when some friends are missing from /me/friends )
  2. It will be odd, because it doesn't work for too many friends..
  3. I tried the same with the graph API, and the same happens (some users ok, rest are not)

What is this?

Thanks in advance


回答1:


Take a look at the Profile settings of your account. Do you see the Apps link on the left?

There's on portion there that says "Apps others use"

People on Facebook who can see your info can bring it with them when they use apps. This makes their experience better and more social. Use the settings below to control the categories of information that people can bring with them when they use apps, games and websites.

Bio

My videos

Birthday

My links

Family and relationships

My notes

Interested in

Hometown

Religious and political views

Current city

My website

Education and work

If I'm online

Activities, interests, things I like

My status updates

My app activity

My photos

If you don't want apps and websites to access other categories of information (like your friend list, gender or info you've made public), you can turn off all Platform apps. But remember, you will not be able to use any games or apps yourself.

If your friends have that checked. I believe apps won't be able to get your friends' images through your access_tokens even if you have allowed the "friends_photos" permission enabled for the app that you're using.

I did an experiment and apparently I found that I must get my friend to also access the app to allow the app to access their photos under the "user_photos" permission. only then can I get their photos using my access token with the "friends_photos" permission.

Not sure if this makes sense to you.



来源:https://stackoverflow.com/questions/16476321/facebook-api-get-friend-albums-not-working-for-some-friends

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!