开发者

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.

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

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.

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

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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜