Is there a way to embed @mention in a Facebook status update posted via pyfacebook?

My application has the following code:

message = "Hi, @John Doe!"
postID = fb.stream.publish(
    message = loader.render_to_string('wall_post.phtml', {'message':message}),
    action_links = simplejson.dumps([{'text': "Check out blah", 'href': "http://blah.dev"}]),
    target_id = 'nf'
)

Is there a way to present facebook @mention in a message line so that facebook converts it to a profile link for a specified user?

+3
source share
5 answers

Mention that it is partially available on an open schedule. You can only use when publishing an open chart. ACTION

Check: https://developers.facebook.com/docs/opengraph/mention_tagging/

It is still not possible to use @mention tags in classic posting via API

+1
source

. - facebook :

@[139730900025: PhotoGrabber]

, . facebook "Stream", :

http://forum.developers.facebook.com/viewtopic.php?id=47885

+4

, . , , tam7t, ... api.

0

, .

0

API AFAIK facebook . , , - , , , tam7t. facebook (m.facebook.com), .

. Facebook Application TOS.

: ruby, , Gem

require 'mechanize'

agent = Mechanize.new
agent.user_agent_alias = 'Mac Safari'

page = agent.get('http://m.facebook.com')
form = page.forms.first
# enter credentials
form.pass = 'user password'
form.email = 'user@example.com'
page = agent.submit form

# go straight to page to post on 
page = agent.get("http://m.facebook.com/wall.php?id=PAGE_ID_NUM")
form = page.forms.first
form.message = "@[139730900025:PhotoGrabber] is awesome"
page = agent.submit form

. , ( tiagoboldt) / . facebook, .

However, returning to the original question of putting @mention in a wall pillar, I noticed that although mail and @mention go up on the wall, this method does not apply to the message mentioned to the user / wall page. Not sure if this is important to you.

0
source

Source: https://habr.com/ru/post/1723732/


All Articles