In the Facebook API (REST), how do you like a photo? There's a stream.addLike function, but you need the post_id, and I don't see a way to get the post_id of a photo (not the same as the pid or the object_id).
A:
I think that the actual photo is classes as the same type of entity os a wallpost, so asloon as you can aquire the stream_id for the photo, it the comments that are attached to the photo you can set stream.addLink
found http://developers.facebook.com/docs/reference/rest/stream.addLike Here
By getting the post_id via the photos.get method you should be able to set a comment adn like the object via the stream.addLike.
Hope this helps you.
RobertPitt
2010-06-09 03:40:11
You can't get the post_id from photos.get which is the whole problem, you can only attain the object_id and pid. And I don't see a way to go from those to post_id.
QuinnBaetz
2010-06-09 16:48:12
Have you tried a cross table join using FQL Like so: SELECT pid, aid, owner, src, src_big, src_small, link, caption, created FROM photo WHERE pid IN (SELECT pid FROM photo_tag WHERE subject=<uid>) AND aid=<aid> AND pid IN (pid)
RobertPitt
2010-06-10 15:54:01
That doesn't get the post_id. I found out that this is impossible unless you have a partnership with facebook :D
QuinnBaetz
2010-06-11 21:11:50
Do you have a reference for that?
ajbeaven
2010-08-17 02:30:27
I think when a user adds a photo the photo goes into the desired folder, and facebook auto creates a templatized stream for that image, so when you like an image your actually liking the generated stream item. not 100% sure but that's how I would develop it to keep the entities separate.
RobertPitt
2010-08-17 09:27:39
I talked with someone who had a partnership with facebook, in person, no reference other than that
QuinnBaetz
2010-10-26 16:01:58