Question:

When I'm writing on a user's wall in facebook.com, I can use @friend_name to have the name linked to my friend's profile. How can I do that when publishing a post via Graph API?

 

 

 

Answer:

Appreciate if you can like this page if you find it useful! - Click "Like"

To have your friend's name to be displayed as a link to his/her user profile when publishing a post via Graph API, you can use the syntax when formatting the message:

@[{user_id}:1:{name}]

For example, if you want to publish the message "I had met my old friend XXXX today!" where XXXX will be a link to your friend's profile (with user ID 1234567890), then simply prepare the message as:

I had met my old friend @[1234567890:1:XXXX] today!

Then publish it via Graph API as usual.

 

Find my FAQ on Facebook Development useful? Download the PDF for all the FAQs HERE!