[X] This issue is not security related and can safely be disclosed publicly on GitHub
Xcode version
15.0.1
Facebook iOS SDK version
14.1.0
Dependency Manager
SPM
SDK Framework
Login
Goals
I want to fetch the profile picture of the logged in user and display it in the app
Expected results
User's profile picture to be fetched and loaded in the image view
Actual results
The image URL I get from the API returns a 404 when called
Steps to reproduce
All the relevant code is added in the code samples section.
I have a SwiftUi project and I added Facebook iOS SDK v14.1.0 via SPM.
I have enabled public_profile permission on Facebook's app dashboard.
I call the login() method on the LoginManager() which is successful and I get an access token.
Then I initiate a GraphRequest for id, email, first_name, last_name, picture.type(large) fields which is also successful and for picture, I receive a URL like below.
Checklist before submitting a bug report
Xcode version
15.0.1
Facebook iOS SDK version
14.1.0
Dependency Manager
SPM
SDK Framework
Login
Goals
I want to fetch the profile picture of the logged in user and display it in the app
Expected results
User's profile picture to be fetched and loaded in the image view
Actual results
The image URL I get from the API returns a 404 when called
Steps to reproduce
All the relevant code is added in the code samples section.
public_profile
permission on Facebook's app dashboard.login()
method on theLoginManager()
which is successful and I get an access token.GraphRequest
for id, email, first_name, last_name, picture.type(large) fields which is also successful and for picture, I receive a URL like below.parseProfilePicture()
method. I create aURL
object with the above and pass it to aURLSession
task to fetch its data.There is a thread on this same issue on community forums that's been open for a month with no answer hence I'm posting it here for attention.
Code samples & details