Facebook - velruse.providers.facebook

The Facebook provider authenticates using the latest Facebook OAuth 2.0 API with the Social Graph API to obtain additional profile information for use with user registration.

To use the Facebook authentication, you must register a Facebook application for use with Velruse. You can do that by using the following links to learn about and create said application. Once you have done so, you will be supplied with a consumer key and a consumer secret specific to Facebook.

Facebook Developer Links:

Settings

consumer_key
Facebook App Id
consumer_secret
Facebook secret
scope
Optional comma-separated list of extended permissions. The scope is used to request access to additional Facebook properties known as Extended Permissions. It should be a comma-separated list.

POST parameters

The Facebook provider accepts a scope argument, which is used in the authenticating request to access additional Facebook properties known as Extended Permissions. These should be a comma separated string, for example:

<input type="hidden" name="scope" value="publish_stream,create_event" />

Complete Example:

<form action="/velruse/facebook/auth" method="post">
    <input type="hidden" name="scope" value="publish_stream,create_event" />
    <input type="submit" value="Login with Facebook" />
</form>

Facebook also accepts a display argument, which will indicate the UI for Facebook to use. For more information, see OAuth Dialog. For instance, if you would like to use the “popup” interface:

<input type="hidden" name="display" value="popup" />

Pyramid API

Facebook Authentication Views

class FacebookAuthenticationComplete(profile=None, credentials=None, provider_name=None, provider_type=None)[source]

Bases: velruse.AuthenticationComplete

Facebook auth complete

includeme(config)[source]
add_facebook_login(config, consumer_key, consumer_secret, scope=None, login_path='/login/facebook', callback_path='/login/facebook/callback', name='facebook')[source]

Add a Facebook login provider to the application.

add_facebook_login_from_settings(config, prefix='velruse.facebook.')[source]

Table Of Contents

Previous topic

Provider Documentation

Next topic

Github - velruse.providers.github

This Page