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?

any update on this item?

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.

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

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

Stanislav

any updates?

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

Has this been released Anatolii?

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

Was this done?

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

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