Reputation: 325
I've got an application using the Yammer API, and I have a specific topic that I'd like to apply to a message (I know it by topicid).
The API is incredibly unclear: https://developer.yammer.com/api/#messages-manipulating
>*topicn*
>
>Topics to apply to the message. Can use topic1 through topic20.
If I send a message with
topic1:1234567
Where the number is a topicid. I get a message with a topic entitled the topic number.
Any idea what the syntax is to get the topic to match that topicid instead of creating a new one?
Upvotes: 1
Views: 2143
Reputation: 129
You can both :
Exemple if your topic is "Software" and you add in the message Body #Software you will see that the topic Software has been added to your post but you will also see #Software as a link in the message body. Not fantastic...
This is the correct syntax :
yam.platform.request(
{
url: "https://api.yammer.com/api/v1/messages.json"
, method: "POST"
, data: {
"body" : msg_value
,"group_id" : groupID
,topic1 : "Software"
}
...
Doing it that way, you won't see the topic name in the post...This is much better :-)
Upvotes: 2
Reputation: 36
I struggled with the documentation as well - for me, the following worked: "body=A message with topics #foo #bar". In other words, the topics are the actual tags. Note that depending on the media type you set, certain characters (such as ";") may be problematic in the string.
Upvotes: 2