Question

I am using the Facebook4J API and I want to get the link to a comment.

I get a ResponseList<facebook4j.Post> and check each Post for comments. For every comment I find I want to generate the URL that links to it. For example, you can right-click on the date of any Facebook comment to get the link that I want:

Right clicking on the date of a comment gives you the link

I want to generate this programatically if it is at all possible.

I can get the "id" of a comment which is in the form "USERID_POSTID", and for a Facebook post I can simply substitute the parts into this template http://www.facebook.com/permalink.php?id=USERID&v=wall&story_fbid=POSTID to get the link to the post. However for comments this doesn't work.

Here are some example links:

https://www.facebook.com/photo.php?fbid=10152012026256749&set=a.53081056748.66806.6815841748&type=1&comment_id=22037156&offset=0&total_comments=4977

https://www.facebook.com/pinkfloyd/posts/10151812651902308?comment_id=29056100&offset=0&total_comments=66

https://www.facebook.com/groups/trademefiji/permalink/624987494214856/?comment_id=625025077544431&offset=0&total_comments=2

Any help would be appreciated!

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top