1

I'm doing a login with Facebook through the Firebase login. I do:

FBSDKLoginManager().logIn(withReadPermissions: [...], from: self) { (result, error) in 

       guard let current = FBSDKAccessToken.current() else { return }
       guard let token = current.tokenString else { return }           
       let credential = FIRFacebookAuthProvider.credential(withAccessToken: token)
       FIRAuth.auth()?.signIn(with: credential) { (user, error) in
            //user.photoURL
       }
}

user.photoURL contains the url of the image, but it is very small (100x100), I would like to retrieve the bigger image.

On this stackoverflow post they say to add ?type=large to the url but it doesn't work.

Any solution?

Community
  • 1
  • 1
Andrea.Ferrando
  • 987
  • 13
  • 23

1 Answers1

1

If you want to go through Facebook Graph then you can get the larger image from url

Here is an example of that, in this url you just need to pass your id, you will get larger image

http://graph.facebook.com/yourId/picture?width=400&height=400

For more info you can check this link

Rajat
  • 10,977
  • 3
  • 38
  • 55