This post is for those who are looking for a bit of fun using the facebook graphAPI and a bit of python scripting.
Believe me, with Python you can do wonders in just 20 lines of code.
A holy person tells me about the list comprehensions in Python:
l = [anything for anything in some other anything!] #Some joke :P
The above line is just one example of what Python can do in just one line of code, which other languages can't do. Of course the cost is speed. But I'll tell you one thing. We are not doing Competitive programming or any other very time limited things. We have sufficient time for performing the real life interactions with graphAPI and perform all the reading of data from dictionaries and lists and json data.
Okay, so alot of talking above. Let's get back to work.
So wandering over the internet, I read somethings about the facebook GraphAPI and thought why not make something which makes my life easier a bit.
I immediately started looking for the resosurces for using GraphAPI. I was comfortable with Javascript to a great extent, but still on learning about facepy or the facebook-sdk for python I thought, why not keep my hands still dirty with python.
So I went over to facebook-sdk's github page and documenatation page(links below), and was fascinated by the moment when I just logged my 'id' in the console. I knew it will work now.
So i read the docs further and built a simple python script to automatically like Birthday posts on my wall.
I am not mentioning the code here. Mail me if anyone wants to talk further about this.
What I basically wanted to convey was that, we should never limit ourselves to one thing. Go deeper, into unknown and you would come out knowing some great things.
Python and GraphAPI--- Amazing pair.
Do give a +1 if you find it interesting.
Thanks!
Some links:
Facepy Github page
facebook sdk docs
Okay, so alot of talking above. Let's get back to work.
So wandering over the internet, I read somethings about the facebook GraphAPI and thought why not make something which makes my life easier a bit.
I immediately started looking for the resosurces for using GraphAPI. I was comfortable with Javascript to a great extent, but still on learning about facepy or the facebook-sdk for python I thought, why not keep my hands still dirty with python.
So I went over to facebook-sdk's github page and documenatation page(links below), and was fascinated by the moment when I just logged my 'id' in the console. I knew it will work now.
So i read the docs further and built a simple python script to automatically like Birthday posts on my wall.
I am not mentioning the code here. Mail me if anyone wants to talk further about this.
What I basically wanted to convey was that, we should never limit ourselves to one thing. Go deeper, into unknown and you would come out knowing some great things.
Python and GraphAPI--- Amazing pair.
Do give a +1 if you find it interesting.
Thanks!
Some links:
Facepy Github page
facebook sdk docs
No comments:
Post a Comment