Re: [Tutor] Facebook apps with python
On Wed, Jan 18, 2012 at 8:34 AM, karthik s wrote: > Well, my question is simple.. > How do I create facebook apps with python. I have couple of interesting/ > funky programs and want to make them as apps. > So, > 1. What all things I should know for writing facebook apps. > 2. I read that we should first upload our app to 'google app engine' and > need do link it to facebook.. Is that right? > 3. Actually, I am not aware of Network/ Web programming.. can I be able to > do that? > 4. Please do mention a couple of books (ebooks) from which I can learn.. > That will help me. I don't know if this will help, but the Facebook Graph API allows you do neat things. https://developers.facebook.com/docs/reference/api/ Here's something small I wrote a little while ago that just grabs all your friends profile photos and saves them with their name as the filename. Not necessarily anything useful, but a small example of what you can do with it. #!/usr/bin/env python import os import httplib import json from urllib import urlretrieve server = 'graph.facebook.com' myID = 'username' accessToken = 'this is the token' URL = "/usernam/friends?access_token=" + accessToken def getfriends(): conn = httplib.HTTPSConnection(server) conn.request("GET", URL) response = conn.getresponse() data = response.read() list = json.loads(data)['data'] IDs = [(friends['id'], friends['name']) for friends in list] return IDs def getphotos(): if not os.path.exists("photos"): os.makedirs("photos") for id, name in getfriends(): url = "https://graph.facebook.com/"; + id + "/picture" filename = os.path.join("photos", "%s.jpg" % (name)) urlretrieve(url, filename) def main(): getphotos() if __name__ == '__main__': main() > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > > ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Facebook apps with python
On 18/01/12 13:34, karthik s wrote: Well, my question is simple.. How do I create facebook apps with python. I have no idea, I never use Facebook. But given this is a list for peiople learning the Python language it might be too specialised a question, you might be better on the general Python list. However, here goes a starting point... 1. What all things I should know for writing facebook apps. No idea on this one. 2. I read that we should first upload our app to 'google app engine' and need do link it to facebook.. Is that right? Do you know about the Google App Engine? Thats a whole topic in itself. You probbably need to visit Google and do some digging there. 3. Actually, I am not aware of Network/ Web programming.. can I be able to do that? You can do general network/web programming in Python. But if using Google is necessary then it's not going to be that standard... 4. Please do mention a couple of books (ebooks) from which I can learn.. That will help me. What is your starting point? Are you a complete beginner to programming? Can you program already in another language? Can you program already in Python? What OS and Python version are you using? -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Facebook apps with python
Please try this karthik https://www.google.com/search?client=ubuntu&channel=fs&q=how+to+create+facebook+app+using+python&ie=utf-8&oe=utf-8 On Wed, Jan 18, 2012 at 7:04 PM, karthik s wrote: > Well, my question is simple.. > > How do I create facebook apps with python. I have couple of interesting/ > funky programs and want to make them as apps. > > So, > > 1. What all things I should know for writing facebook apps. > > 2. I read that we should first upload our app to 'google app engine' and > need do link it to facebook.. Is that right? > > 3. Actually, I am not aware of Network/ Web programming.. can I be able to > do that? > > 4. Please do mention a couple of books (ebooks) from which I can learn.. > That will help me. > > > ___ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > > -- Cheers, Ranjith Kumar K, Chennai. http://ranjithtenz.wordpress.com ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor