criso / fbgraph

NodeJs module to access the facebook graph api
http://criso.github.io/fbgraph/
1.09k stars 177 forks source link

Complete beginner example is missing #111

Closed Darker closed 7 years ago

Darker commented 7 years ago

have the problem that I never did anything with facebook API. The readme is therefore confusing for me and I can't get the library to work. Some issues:

Are there even any complete examples of this working?

HideyaSwider commented 7 years ago

The access token is a string generated by Facebook. It expires at some point, not sure if lifetime access tokens exist or not. Check this out for more information about the permissions. You will find your client id and client secret here after clicking on the icon of your app.

johnnybehague commented 7 years ago

I agree with Darker : this readme is not user friendly at all, we throw some pieces of codes without informations, and we have to navigate between Graph API documentation (which is already boring) and here. Why not a complete working example ?

HideyaSwider commented 7 years ago

I do too. I tried to get it to work but I put it on-hold. I am not done yet. I will let you know if it works for me.

Darker commented 7 years ago

Well, I at least sent a pull request with final example that actually works. Main problem was that Express server changed a bit.

criso commented 7 years ago

I've merged the pull request, thanks for that! regarding:

1. What is access_token? What OAuth means; why and how to use it?
2.How do I login, or allow permissions for APP for my Facebook account?
3. What is conf.client_id? Or conf for that matter?

This lib is to just access the api (just trying to do one thing) To do so you, you do need to grok the fb book api however boring it may be. I get what you mean, where the beginner needs to learn the above. But this lib won't help you with getting an access token or logging in, which is why it doesn't make a lot of sense to put it in the ReadMe

Text communication is hard - just to be clear. I'm not trying to be a jerk or whatever. Just sayin' -- this lib accesses the FB API - you still need to understand how that api and connecting parts work. 😄

This might help as well: https://github.com/dhigginbotham/express-fbauth