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://email@example.com/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
steven80 began watching rmorison/Cones
e92eed6 - -Add "packages" that don't have distutils setups
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 ...
db509ac - First pass, sandbox site
3400a6f - newsite.py -> conessite.py
992e87a - Move from lib/cones to ./cones to align for a standard install/build procedure
bc6046e - Prep'd for moving gaesessions and facebook into the repo, as they aren't package ready.
4a10e82 - -fbcontroller: Fixed auth updating, much debug code still in there -fbuser: Stopped FbUserBase from stomping on child fields