Yammers REST API来分享信息 [英] Yammers REST API to Share a Post

查看:139
本文介绍了Yammers REST API来分享信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要使用REST API来分享信息(不张贴新的信息,但分享现有员额)从我的业务应用程序。有谁知道使用哪个端点,以及如何实现的。

I want to use REST API to share a post (Not posting a new message but sharing existing post) from my line of business application. Does anybody know which endpoint to use and how it can be achieved.

推荐答案

在使用Yammer的API来创建一个新的职位,传递参数:shared_message_id你想要分享的消息的Message_ID

When you use the Yammer API to create a new post, pass the argument :shared_message_id with the message_id of the message you want to share.

例如,在Ruby中,你可以这样做:

For example, in Ruby, you could do this:

require 'yammer'
group_id = '123456'
shared_message_id = '7890123'
yam = Yammer::Client.new(:access_token => 'OAUTH_TOKEN')
yam.create_message('Message text to accompany the shared post', :group_id => group_id, :shared_message_id => shared_message_id)

这会发表GROUP_ID与标准共享消息视图指定的组中一个新的消息。

This will post a new message in the group specified by group_id with the standard shared message view.

您将不得不改变的oauth_token上面OAuth令牌的用户帐户,或者您的应用程序的令牌。

You will have to change OAUTH_TOKEN above to the oauth token for your user account, or to your app's token.

这篇关于Yammers REST API来分享信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆