Sinisterly
Writing to walls and commenting on photo's using Facebook API - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: Coding (https://sinister.ly/Forum-Coding)
+--- Forum: Python (https://sinister.ly/Forum-Python)
+--- Thread: Writing to walls and commenting on photo's using Facebook API (/Thread-Writing-to-walls-and-commenting-on-photo-s-using-Facebook-API)



Writing to walls and commenting on photo's using Facebook API - Alan Turing - 01-12-2014

My code to write on my own wall:

PHP Code:
import fb auth="token" var=fb.graph.api(auth) facebook.publish(cat="feed", id="ID of my account here", message="hi")

I tried using my friends ID's and trying, but it doesn't work, and instead posts on my own wall, I'd like to know how so maybe I could add a loop to spam the wall too.

As for commenting on Facebook photos, my code is:

PHP Code:
import fb auth="token" var=fb.graph.api(auth) facebook.publish(cat="comments", id="the photo ID which is located where it says fbid=<num here> I think", message="Msg here")

I tried that and it says name isn't defined, but I feel like even if I did it didn't work because the ID isn't the right one.