Backendless Support
 
Answered

Get Facebook Profile URL

I'm using Facebook SDK and Google SDK for enabling login in my iOS app.

In Google SDK, I could simply map the profile picture URL using the following field mapping.

let fieldsMapping = ["id": "socialid", "name": "name", "email": "email", "picture": "picture" ]

However, in Facebook SDK, the picture object returns a JSON string and gets stored in the backend.

picture = "{\"data\":{\"is_silhouette\":false,\"url\":\"https://scontent.xx.fbcdn.net/hprofile-xpf1/v/t1.0-1/c34.34.425.425/s50x50/74264_4838288591863_1502689468_n.jpg?oh=75fb3d383b17145ee11d3b2af6fb993c&oe=577D153F\"}}";;

Is it possible to just retrieve the URL using field mappings?

Leave a Comment

Comments (11)

photo
1

any update on this item?

photo
1

Hi, Arasan. This is not achievable with fieldsMapping only.

The JSON you specified is what comes back in Facebook response for "picture" field. You can check it with Facebook Graph API Explorer tool. So extracting pure picture URL is up to you. You can try to achieve this with event handler for Facebook registration in Backendless Custom Business Logic.

At the moment there is no event handler for RegisterWithFacebook (just a plain "login/password" register event handler), but we'll add it in upcoming release, and notify you on this.

photo
2

Also interested in the event handler for facebook/twitter registration. Can you let us know when it gets released?

photo
1

It is expected that it will be released in about two weeks.

Stanislav

photo
1

any updates?

photo
1

The feature is in the testing stage now. We'll notify on when it is released.

photo
1

Has this been released Anatolii?

photo
1

On the next week server will be updated with these changes. Sorry for delay.

photo
1

Was this done?

photo
1

Social handlers will be released in next server version (on the next week)

photo
1

not fixed yet i had to extract the url change it and update user picture in the user table with the new url

photo