Facebook profile images in spotify

2019-03-03 13:45发布

问题:

I want to display facebook profile pictures in my spotify app, but what urls should I allow in the manifest file?

I know I can retrieve the images through http://graph.facebook.com/[user_id]/picture but that is just a redirect to the actual image. The image will still be blocked unless I allow it in the manifest file.

I've only tested with 3 profiles so far and the images are located on these 2 servers.

https://fbcdn-profile-a.akamaihd.net/

http://profile.ak.fbcdn.net/

I'm guessing there are quite a few servers holding the profile pictures, and how can I make my app future-proof?

Thanks in advance!

回答1:

Our own apps that display profile images use the following two entries in RequiredPermissions:

"RequiredPermissions": [    
    "https://fbcdn-profile-*.akamaihd.net", 
    "http://*.fbcdn.net"    
],

Those two (pay attention to the asterisks) should be fine for your app too. I can't guarantee that Facebook won't change it in the future, though! :-P