tags:

views:

447

answers:

3

I am trying to do @ mentions on Facebook using either facebook.stream.publish or facebook.users.setStatus.

You are able to do this on Facebook and I know its possible to do using 3rd party APIs as a "Twitter Sync" app currently supports it.

So far I have tried using: @[fb_id], @:fb_id, @[fb_id:fb_name], @:[fb_id:fb_name] and @:[fb_id] in the stream message.

I know Facebook.com uses @[fb_id:fb_name] on the site.
I also know Facebook's Dashboard API uses @:fb_id
I am also willing to emulate this functionality on my end if someone knows how to insert an url into the user's status or stream with custom link text or some method of inserting FBML into the stream (<fb:name>)

Note: fb_id = Facebook User ID
fb_name = Facebook User Name
example: @[552192373:Jason Boehm]

I am currently using Facebook's Offical PHP API Client.

+2  A: 

Have you seen this? http://stackoverflow.com/questions/1787413/is-there-a-way-to-insert-an-mention-into-a-facebook-status-update-posted-with-py

Macmade
yes, i saw it, but it doesn't work
Jayrox
not sure who voted this up, but its not a working answer.
Jayrox
A: 

I had the same problem, i did that with te setStatus function, and now is working. To set the Facebook user status first i had to create a application on facebook, and trought it is how i can set states to users that had added that app.

$appapikey = yourAppiKey;
$appsecret = yourAppiSecret;
$fb = new Facebook($appapikey,$appsecret);
$fb_user = $fb->get_loggedin_user();
if ($fb_user){
  $has_permission = $fb->api_client->users_hasAppPermission("status_update");
  if ($has_permission==0)
  {
$this->redirect("http://www.facebook.com/authorize.php?api_key=".$appapikey."&amp;v=1.0&amp;ext_perm=status_update&amp;next=url-to-your-web-after-assign-perms=#");                 }
  }else{
    $fb->api_client->users_setStatus($state);
  }

the appi secret and appikey is in the config of the application that i created on facebook.

the fb_user has the current facebook user logued, but you can set this var with the user that you need. And before setStatus you need that the user yo allow the app to setStatus.

i hope it helps .

Luciano

Luciano
Thanks, however, I am able to post to the user's wall. I am trying to do the '@ mention' tags.
Jayrox
not sure who voted this up, but not a working answer.
Jayrox
A: 

I have submitted a ticket for this issue here:

http://bugs.developers.facebook.net/show_bug.cgi?id=12947

This is an example of ABUSE of the facebook platform.

Colin Godsey
note the main part: Some applications recently (LOLapps's Critter Island for example) have beenusing some kind of exploit in the API allowing the post to users stream *WITHOUTthe post saying what app it came from* and WITHOUT using any documented methods!Which has *nothing* to do with the original question.
Jayrox