Home > Blockchain >  how to retrieve facebook's user data from "developer facebook"
how to retrieve facebook's user data from "developer facebook"

Time:06-17

I want to create a web app for educational purposes in which I required a search bar which helps me get facebook's user data

for example: username, image

these two fields are enough for me.

Is it possible for me to retrieve such data? if yes then I want to create that app in react.js and I want a roadmap/instructions that help me to achieve such requirements. I am new to handling such a task please make it simple, thanks

CodePudding user response:

Here is the basic steps:

  • Create a facebook app and add facebook login to it.
  • Setup facebook login allowed SDK URls (where you will call the login method) and redirect URL after login.
  • Add needed permissions to your app
  • Add facebook SDK scripts to your react index.html or install the SDK.
  • Using the SDK call FB.login() and from the response save the user access token
  • send a request to FB_API_URL/me to get the user data you want

before all that test your requests to the created app with FB graph API Explorer enter image description here

  • Related