Skip to main content

Pyramid routes and helpers for Facebook canvas applications

Project description

Provides simple pyramid routes/views for facebook canvas application.

Some documentation on https://pyramid_facebook.readthedocs.org/en/latest/

Configuration

  1. Create facebook application on https://developers.facebook.com/apps

  2. Add facebook settings in .ini file under application section and fill with facebook application parameters:

    facebook.app_id =
    facebook.secret_key =
    facebook.namespace =
    facebook.scope =
  3. In the app settings on https://developers.facebook.com/apps, set callbak url to point to

    http://127.0.0.1:6543/[facebook app namespace]/
  4. Include pyramid_facebook in your config:

    config.include('pyramid_facebook')
    config.scan()
  5. Define your facebook canvas view:

    from pyramid_facebook.canvas import facebook_canvas
    
    @facebook_canvas()
    def canvas(context, request):
       # canvas is available only to users who accepted facebook permission
       # defined in setting['facebook.scope'].
       # context.facebook_data dict contains signed_request content.
       # i.e.:
       # user_id = context.facebook["user_id"]
       ...
       return Response('Hello Facebok World')
  6. Browse to your app on

    http://apps.facebook.com/[app namespace]

Development

0.2.246

  • Reusable view and template for OpenGraph objects.

  • Support for Facebook local currency payments.

This release is backward-compatible for apps that use the app currency and Facebook credits decorators. A future version will remove support for credits (Facebook will remove them) and app currencies (which can now use the generic OpenGraph view).

0.2.235

  • Packaging fix-ups.

0.2.220

  • Fix bug where permissions defined in facebook.scope setting were ignored by prompt_authorize.

0.2.217

  • Add view to redirect from GET canvas to the Facebook application page.

0.2.207

  • Move predicates from lib to predicates.

  • Add PermissionEventPredicate for filtering event subscriber with permission.

0.2.2

  • Include pyramid_contextauth for dealing with context-based authentication.

0.1.194

  • Added CanceledOrder when any payment update fail during event notification.

  • add includeme for any sub module to uniform configuration

  • facebook auth policy does not rely anymore on context for authentication.

  • add an CanvasRequested event triggered when a identified user request canvas.

0.1.127

  • In credits: Check item title not being an empty string to avoid FB failing with no explicit message. “Fail early.”

  • Fixed bug which raised configuration conflict because pyramid_facebook was not commiting config via config.commit.

0.0

  • Initial version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyramid_facebook-0.3.293.tar.gz (27.9 kB view details)

Uploaded Source

File details

Details for the file pyramid_facebook-0.3.293.tar.gz.

File metadata

File hashes

Hashes for pyramid_facebook-0.3.293.tar.gz
Algorithm Hash digest
SHA256 27011ec6b343c4494a15737b3613c5b1f830562c17bcf2724b37ee3bdf4f35e0
MD5 ca4d8eba0e17baec5aa8899421eb1e64
BLAKE2b-256 3aee32c3e56da6f738219a425e9a2a63609dd40cfbbeff96179425a385381e16

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page