Skip to main content
https://drone.io/bitbucket.org/Ludia/pyramid_facebook/status.png https://pypip.in/d/pyramid_facebook/badge.png

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]

Changelog

2.0.2 (2014-12-17)

  • Add a test configuration in pyramid_facebook.tests which mocks facepy graph api object. To use it in functionnal tests: config.include('pyramid_facebook.tests') when configuring test app.

2.0.1 (2014-11-25)

  • Upgrade to facebook graph api v2

1.0.1 (2014-11-25)

  • Add Facebook payment event type for refunded orders.

0.6.7 (2014-08-26)

  • Remove constraint on pyramid_contextauth version requirement.

  • Add pyramid_mako as required dependency.

0.6.6 (2014-05-05)

  • Improve request property request.graph_api

  • Add request property request.fb_app_token

0.6.5 (2014-04-23)

  • 2014-04-23 - Facebook real time payment fails and logging code raises a KeyError.

0.6.4 (2014-03-26)

0.6.3 (2014-03-25)

  • Fix doc and rst file for pypi.

0.6.2 (2014-03-25)

  • Remove authentication_policy decorator in favor of config.register_authentication_policy.

0.6.1 (2014-03-24)

  • Update dependency to pyramid_contextauth >= 0.5

0.5.324

  • Add a GraphAPI utility lazily instantiated with the application token.

  • Add attribute ChangeNotification.object event.

  • Event OrderReceived is notified when receiving a real-time payment update

  • Add pyramid_facebook.tests.integration.test_payments used in pyramid_facebook.tests.functional.test_payments

Breaking Changes

  • Rename OrderCreated for OrderReceived

    • Can be sent multiple times for the same order with same or different status

  • Rename OrderCreationError for OrderProcessingError

0.4.317

  • Added pfacebook-real-time command to update real time subscriptions.

  • Breaking changes: namespace is now added by the framework in opengraph URLs.

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

Release files for pyramid_facebook 2.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyramid_facebook 2.0.2
File Size Uploaded
pyramid_facebook-2.0.2.tar.gz 34.2 kB Details

Release files / pyramid_facebook-2.0.2.tar.gz

Download URL pyramid_facebook-2.0.2.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
529c725a61941d00810a04f295c5a9ca32be8997444f47f77d5ff082868442b6
BLAKE2b-256 checksum
How to use checksums
9cebc5e522f81d1392a05a4587b10fbc3930955fa4dbe740d4998e1f9407cc8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.0.2 This release

1 release file

2.0.1

1 release file

1.0.1

1 release file

0.6.7

1 release file

0.6.6

1 release file

0.6.5

1 release file

0.6.4

1 release file

0.6.4.dev0

0.6.3

1 release file

0.6.2

1 release file

0.6.2.dev0

0.6.1

1 release file

0.6.0

1 release file

0.5.353

1 release file

0.5.347

1 release file

0.5.324

1 release file

0.4.317

1 release file

0.4.313

1 release file

0.2.268

1 release file

0.2.262

1 release file

0.2.258

1 release file

0.2.250

1 release file

0.2.246

1 release file

0.2.243

1 release file

0.2.226

1 release file

0.2.220

1 release file

0.2.207

1 release file

0.2.2

1 release file

0.1.186

1 release file

0.1.183

1 release file

0.1.179

1 release file

0.1.145

1 release file

0.1.140

1 release file

0.1.116

1 release file

0.1.57

1 release file

0.1.37

1 release file

0.1.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page