Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more in depth samples #91

Open
dantman opened this issue Apr 15, 2017 · 0 comments
Open

Add more in depth samples #91

dantman opened this issue Apr 15, 2017 · 0 comments

Comments

@dantman
Copy link

dantman commented Apr 15, 2017

Too many people ask "How do I do this?" questions, for which they should be just looking at the Graph API documentation / asking on Stack Overflow and then just writing the equivalent FB.api call for.

The sample app is also probably better off dead. This is a library and so a full fledged html app does not help demonstrate how to make api calls. Examples are better off short like those in the README.

However I suppose we could add more in-depth code samples that instead of abstractly documenting how to make API calls give examples of actual API calls that can actually be run.

Instead of the readme these could live in a SAMPLES.md.

The samples doc could point you to creating a sample app to get and API key and secret. As well as using Facebook's own Graph API Explorer to grab an access token.

As a bonus, we could probably link to the samples page through RunKit (https://runkit.com/npm/fb/SAMPLES.md) to allow people to run samples themselves. And/or we can create our own "Notebooks" on the site and link to them from each sample. Apparently RunKit allows for users to define environment variables with API keys, so we can make use of that to allow people to create their own Facebook sample apps.

However to force RunKit to use the right versions in examples we may have to either use require('[email protected]') syntax in the samples and automatically update them each new version. Or use the RunKit api to automatically create a "Notebook" for each new release, replacing old ones each release so RunKit uses the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant