Facebook Graph Mapping - Main Picture URL

I would like to ask, how to properly map user profile picture (ideally via iOS SDK)

Graph url is: me/picture?fields=url&type=large

Backendless.sharedInstance().userService.easyLoginWithFacebookFieldsMapping([“email”:“email”, “username”:“username”, “gender”:“gender”, “name”:“name”, “avatar”:“picture”], permissions: [“email”,“user_birthday”], response: { (response:AnyObject!) -> Void in

        print(response)

        }) { (err:Fault!) -> Void in

        print(err)

    }

Hi Tomas!
I think you can use next algorithm:

  1. Login user with Facebook and get user id
  2. Run request http://graph.facebook.com/100001574818751/?fields=picture&type=large, where
    100001574818751 is user id.
  3. In response you receive “url” with link to picture.
  4. Get link to picture and update user with property “avatar”. Set picture url as value of this property.
    This is that you expect?
    Regards,
    Kate.

Dear Kate, is that the best way to get the facebook user picture ?

Hi!

You can use algorithm that described above or wait for these changes http://support.backendless.com/t/android-facebook-login-get-profile-picture.
I think more simple is to add mapping for “picture” attribute (like in “android-facebook-login-get-profile-picture” topic).
Regards,
Kate.