Bitbucket is a code hosting site with unlimited public and private repositories. We're also free for small teams!

Close
Cones
-----

It's not pylons, it's cones! Seriously, a "pylons-lite" webapp 
framework with facebook app utilities, presently targeted for GAE,
but extensible to other wsgi platforms.


Getting Cones and Running the Sandbox App
-----------------------------------------

From a shell:

hg clone https://rmorison@bitbucket.org/rmorison/cones
cd cones
virtualenv conehead
conehead\Scripts\activate.bat # linux/macos: source/bin/activate
python setup.py sdist
pip install -f file://%CD%/dist -r requirements.txt # linux/macos: s/%CD%/$PWD/
python conessite.py conehead sandbox

Facebook and Appengine config:

You'll need an iframe facebook app setup from 
http://www.facebook.com/developers/apps.php with the canvas url
pointing to your server/path. Also, set a deauthorize url to
server/path/auth/deauthorize, if you want cones to track app 
deauthorize requests.

Review the sandbox/config*.py files and make appropriate changes,
specifically the items in config_dev.py and/or config_stage.py: 
FB_APP_ID, FB_APP_SECRET, FB_URI, APP_HOST, APP_PATH. Also, update
the app names(s) in config.py if you are pushing to App Engine.

Getting on the net:

To run sandbox under the appengine devserver against facebook you'll
need a public IP. Some ways of doing this are 
1 - put your dev machine on the net with a public IP (not recommended)
2 - port forward from your public IP to your dev instance
3 - have a webserver proxy from a public IP to your instance

I do the latter with apache and my config is

<IfModule mod_proxy.c>
  ProxyRequests Off

  <Proxy *>
    Order Deny,Allow
    Allow from all
  </Proxy>

  ProxyPass /fb/t5sandbox http://192.168.66.31:8083/fb/t5sandbox
  ProxyPassReverse /fb/t5sandbox http://192.168.66.31:8083/fb/t5sandbox

</IfModule>

For more info see http://bitbucket.org/rmorison/cones

Go for it:

If everything's wired up correctly, try your facebook app url, e.g.,
http://apps.facebook.com/myapp/, or one of the auth test urls,
http://apps.facebook.com/myapp/auth/test/login ,
http://apps.facebook.com/myapp/auth/test/verify

Disclaimer
----------

This library is in a very experimental dev stage. As the man says:
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND.
Issues, comments, suggestions via bitbucket, or however else you
might find me.


Attributions
------------

Cones includes code from http://github.com/facebook/python-sdk/ and 
https://github.com/dound/gae-sessions, because these are not distributed
in a distutils friendly fashion. Both are distributed under the Apache 2.0
license cited below.

Code in cones/fb*.py is adapted from the facebook python sdk at 
http://github.com/facebook/python-sdk/. All original code herein is licensed
under the same terms as http://github.com/facebook/python-sdk/, namely the
Apache License, Version 2.0:


License
-------

# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.


Rod Morison, Nov 2010

Recent activity

Rod Morison

Commits by Rod Morison were pushed to rmorison/Cones

63295b9 - -fbcontroller.py: graphapi property moved from current_user to self. -fbcontroller.py: protect against oauth that doesn't return an access token (thank you fb) -fbuser.py: protect against various ...
Rod Morison

Commits by Rod Morison were pushed to rmorison/Cones

bc6046e - Prep'd for moving gaesessions and facebook into the repo, as they aren't package ready.
Rod Morison

Commits by Rod Morison were pushed to rmorison/Cones

4a10e82 - -fbcontroller: Fixed auth updating, much debug code still in there -fbuser: Stopped FbUserBase from stomping on child fields
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.