Scott
Scott

Reputation: 17037

How to create a link to a Facebook object within a comment using the Facebook API

I would like to be able to recreate the same comment linking ability that facebook has on their front end through the graph API (NOT javascript SDK).

For example, through the web interface I can type in @George... and then lookup one of my friends to link to in the comments. See image below.

enter image description here

I have been able to POST comments using the API as documented here. This is pretty simple by just POSTing to /{POST_ID}/comments with a message parameter (you can try it out here).

However, I have not found anywhere a doc to show how I can put in a link to another object within the comment post. Has anyone done this with the Facebook API?

NOTE: I have tried what one person suggested and put in a simple link. However as you can see from below, it does not give the nice formatted link of the user's name.

enter image description here

UPDATE: When I look what Facebook sends out on the form POST it looks like this

add_comment_text_text:post to Mark test
add_comment_text:post to @[4:Mark] test

but unfortunately, it looks like you can't post to the API in a similar manner (i.e. @[4:Mark]) and get the same results.

Upvotes: 0

Views: 4389

Answers (1)

bkaid
bkaid

Reputation: 52073

This is currently not possible with the Facebook Graph API, only the Facebook website. It has been logged as a feature request though.

Upvotes: 1

Related Questions