phanan / vue-facebook-signin-button

A simple plugin to include a custom Facebook sign-in button into your web app.
137 stars 30 forks source link

Response FB #2

Closed programmermager closed 6 years ago

programmermager commented 7 years ago

its the data what we get its only name and id? how if i want to get more data like email, phone number, birthday etc. is it possible?

ddo commented 6 years ago

add more scope and also set the facebook app permissions

samirph commented 6 years ago

I had the same issue. The scope was correct and the facebook app config had the correct permissions. Still, it was a bit difficult to find that in here:

      FB.api('/me', dude => {
        console.log(`Good to see you, ${dude.name}.`)
      })

You should add an object with a attribute "fields" to get the fields I wanted like this:


FB.api(
        '/me',
        'GET',
        {'fields': 'email,name'},
        dude => {
          console.log(dude)
          console.log(`Good to see you, ${dude.name}.`)
        }
      )

Wouldn't work in my project otherwise.

volkanozyilmaz commented 6 years ago

Hey @phanan Could you update your doc with this sample

FB.api( '/me', 'GET', {'fields': 'email,name'}, dude => { console.log(dude) console.log(Good to see you, ${dude.name}.) } )

please. It takes time to find it here.

phanan commented 6 years ago

This has nothing to do with the plugin. You should know your away around FB's API.