ios - React-native app and Facebook SDK -


i managed create native component logins user facebook. so, in react-native app, i've got access token , userid. now, i'd use facebook sdk (for example, graph api) access basic infos (profile name, profile picture, etc.) , basic things (share post, etc.)

at point i'm quite lost: how can that? can use fetch api? need add node plugin app (i looking this: https://github.com/thuzi/facebook-node-sdk)?

you can make request using fetch api query can https://graph.facebook.com/me?access_token=token_you_got

fetch('https://graph.facebook.com/me?access_token=token_you_got')   .then(response => response.json())   .then(json => this._handleresponse(json.response))   .catch(error =>       this.setstate({       isloading: false,       message: 'something bad happened ' + error    })); 

more information here: http://www.raywenderlich.com/99473/introducing-react-native-building-apps-javascript


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -