Skip to content

Latest commit

 

History

History
39 lines (22 loc) · 1.39 KB

facebook.md

File metadata and controls

39 lines (22 loc) · 1.39 KB

Facebook

This guide will walk you through creating a facebook app & obtaining its ID and secret.

Note that there is an assumption here that the facebook page you are attempting to access is public.

Create Developer Account

Create a facebook developer account at developers.facebook.com.

Create App

In the top-right corner click the My Apps dropdown and select Add a new app.

Fill in a name for the app and click Create App ID.

Get Page Token

Once your app has been created and you have admin rights to your facebook page you will need to create a page token. You can do this from the Graph API Explorer.

Select your app from the top-leftmost dropdown, then select your page from the "Get Token" dropdown. Press the blue button with the letter i to the left of the token to open the "Access Token Info" tooltip. Click the "Open in Access Token Tool" button to open the token tool window. Click "Extend Access Token" to get a long-lived token.

Use token

Create an instance of the Graph API client using this token:

import facebook

graphapi = facebook.GraphAPI('<your-token>')

Use this client as an input to fest.FacebookPage:

import fest

page = fest.FacebookPage(graphapi, 'MyPageID')