简体   繁体   中英

No response in trying to retrieve the profile pictures with facebook api

I'm actually trying to get user's profile picture with facebook graph but. When i make mistakes in query i get response error but when query looks good, I get nothing.

looks good but nothing :

curl https://graph.facebook.com/FACEBOOK_USER_ID/picture \\?access_token\\=GOOD_ACCESS_TOKEN

response : nothing.

wrong access token :

curl https://graph.facebook.com/FACEBOOK_USER_ID/picture \\?access_token\\=WRONG_ACCESS_TOKEN

response :

{"error":{"message":"The access token could not be decrypted","type":"OAuthException","code":190,"fbtrace_id":"AfwXN3diqN5"}

wrong facebook user id :

curl https://graph.facebook.com/WRONG_FACEBOOK_USER_ID/picture \\?access_token\\=GOOD_ACCESS_TOKEN

response :

{"error":{"message":"(#803) Some of the aliases you requested do not exist: 12955422413187","type":"OAuthException","code":803,"fbtrace_id":"Dolxmgphza"}}

looks good with parametersbut nothing :

curl https://graph.facebook.com/FACEBOOK_USER_ID/picture \\?access_token\\=GOOD_ACCESS_TOKEN&type=large

response : nothing.

Have you an idea?

Thanks :)

The URLs of the form https://graph.facebook.com/FACEBOOK_USER_ID/picture issue a redirect to the actual location of the image on Facebook's CDN (unless you explicitly request otherwise.)

So you won't get to “see” anything (because it's just HTTP headers), unless you tell cURL to follow redirects/Location headers - that what the -L / --location option is for.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM