Birthday code! (Thanking friends on facebook using GraphAPI)

I wrote this on my birthday,

import facebook

graph = facebook.GraphAPI('Access token you got from facebook developers page')
feed = graph.get_connections("suryateja.cheedella", "feed?limit=200")
for a in range (0,200):
    post = feed["data"][a]
    fromDetails = (post["from"])
    fromName = fromDetails["name"]
    graph.put_like(post["id"])
    graph.put_object(post["id"], "comments", message="Thank you :d " + fromName)

and then there, it thanked all my friends who wished me on my timeline.

Hello, what’s up guys,

It’s afternoon on 4th and as usually I am browsing on quora and facebook. I stumbled upon ‘what are the best python codes you have written’ question on quora. I saw some top answers which are actually thanking friends on FB on their birthday. Actually it’s the best time to learn or just copy&paste all of that code so, I can make my thanking task easy for tomorrow. But, I wrote ‘Hello world’ program in python just two weeks back. And completed reading like 100 pages of ‘Head first python’. So, I started searching on web and got to know about some thing called GraphAPI. After spending like 5 to 6 hours, I wrote that 10 lines of code (in a perfectly working condition) and tested it.

You can say, dude why don’t you use that already written code found on quora. Basically all those codes are old. I mean those are the codes written before releasing GraphAPI by facebook. With that thing for facebook developers, one can reduce their code to 10 lines (yeah, you look their) from 40 to 50 lines of code which I have found on Quora.

That is not the best way to reach our goal (like commenting on last ‘x’ number of posts on my wall) but, that is what I can learn in that span of time.

Shine.

What I have found?!

Hello,

HaHaaa.. I received all of my summer toys from element14 for free. Yeah, you heard that right, absolutely for FREE. It’s part of roadtest by element14. This is a group dedicated to testing and reviewing new products. I submitted my idea of testing these products and they selected me. And I should agree to their conditions that I should provide them with a neat review within two months of receiving kits. Here are they:

My Toys
Got from element14. Hahaa

 

Briefly, an MSP430 launchpad from TI with Anaren air kit to control a robot or a robotic car with smartphones via bluetooth. Raspberry Pi with Enocean modules (self-powered sensors kit) for home automation. And my idea is switch-off computers or laptops when you leave your room.

After spending all these days lazily, it’s time to start working on these things and provide them with review helps me to spend remaining time lazily….!

Bye for now.

Peace

S

I am happy. I am sad.

Namaste,

Now, I am happy after all these boring holidays, did something productive(posting this) besides learning. You might think it’s insane, learning during holidays. But, thank god I am not studying. I am following some Java tutorials on YouTube and trying to understand my first technical book Head First Java. A hell of a book that. Basically I don’t like reading books, fact is that I completed reading How I Braved Anu Aunty and Co-Founded A Million Dollar Company in two days in my second sem and that is my first book. The main reason I don’t like books is the way they appear, those paras, those lines with same font and size, which eventually makes  me scare and to throw it away.

Head First JAVA

Coming to this book, Head First Java, I didn’t throw it away because it’s a soft copy on my laptop. I didn’t delete it because I
love that book. A ‘Brain-Friendly Guide’, there’s this phrase on cover page and after reading the book (not whole book, though) I realised that the author really mean it. I completed reading 200 pages of 700 in two days(surprisingly, I understood) and realised that it’s really Brain-Friendly. All Happies. Hope my Java journey takes me further. Now, sad part is, there is something big to do in my mind but facing difficulties to practically apply it(Yeah, I know something big always comes with a lot of difficulties). I got selected for two roadtests (reviewing new electronic products, mostly development boards, home automation systems) in which I am about to receive A raspberry-pi with home automation modules(fun part is these modules are self-powered) and A launch pad from TI, MSP430 with bluetooth modules. The real sad part living in India(no hard feelings), it takes a long time to ship these kits to India. All of those who got selected in roadtests have received their kits(not from India). There’s a nice thing to do with those self-powered modules(sensors). But before knowing what can we do with Continue reading