Yammer Activity 更改消息
Yammer Activity changes Message
是否可以在消息中使用 URL 并在 Yammer 中使用 activity?
使用消息 API,可以构造一条消息:
- 正确链接(在这个例子中点击标题进入例子。com/id/1/);和
- 包含一张图片(占位符。it/100x100)。
例如:
#!/bin/bash
GROUP={GROUP}
TOKEN={TOKEN}
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
--data "body=hello" \
--data "group_id=$GROUP" \
--data "og_fetch=false" \
--data "og_url=http%3A%2F%2Fwww.example.com%2Fid%2F2%2F" \
--data "og_title=Title" \
--data "og_image=http%3A%2F%2Fplacehold.it%2F100x100" \
--data "og_description=Description" \
--data "og_object_type=page" \
--data "og_private=true" \
https://www.yammer.com/api/v1/messages.json
- 使用 activity API 可以创建一个开放图谱 object:
示例:
#!/bin/bash
TOKEN={TOKEN}
EMAIL={EMAIL}
curl -X POST \
-H "Content-type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"activity":{"actor":{"email":"'$EMAIL'"},"action":"create","object":{"url":"http://www.example.com/id/1/","image":"http://placehold.it/110x110","title":"Title","type":"page"}},"private":"false","message":"This is an update"}' \
https://www.yammer.com/api/v1/activity.json
问题是现在来自第 1 步的原始消息:
- 不再链接到实际内容(它链接到 https://www.yammer.com/{network}/graph/{id})
- 图像丢失(现在是 mug0.assets-yammer.com/mugshot/images/75x75/3rd_party.png)
顺便说一句,打开图 object 不会针对 activity post 中提供的新图像进行更新(110x110 与 100x100)。文档 (https://developer.yammer.com/v1.0/docs/open-graph) 说 "when an OG object exists (with the same URL), it is updated appropriately."
在一个示例中,您将开放图对象设置为私有,另一个设置为 public。这可能会导致您看到的奇怪问题。
"og_private=true"
是否可以在消息中使用 URL 并在 Yammer 中使用 activity?
使用消息 API,可以构造一条消息:
- 正确链接(在这个例子中点击标题进入例子。com/id/1/);和
- 包含一张图片(占位符。it/100x100)。
例如:
#!/bin/bash
GROUP={GROUP}
TOKEN={TOKEN}
curl -X POST \
-H "Authorization: Bearer $TOKEN" \
--data "body=hello" \
--data "group_id=$GROUP" \
--data "og_fetch=false" \
--data "og_url=http%3A%2F%2Fwww.example.com%2Fid%2F2%2F" \
--data "og_title=Title" \
--data "og_image=http%3A%2F%2Fplacehold.it%2F100x100" \
--data "og_description=Description" \
--data "og_object_type=page" \
--data "og_private=true" \
https://www.yammer.com/api/v1/messages.json
- 使用 activity API 可以创建一个开放图谱 object:
示例:
#!/bin/bash
TOKEN={TOKEN}
EMAIL={EMAIL}
curl -X POST \
-H "Content-type: application/json" \
-H "Accept: application/json" \
-H "Authorization: Bearer $TOKEN" \
-d '{"activity":{"actor":{"email":"'$EMAIL'"},"action":"create","object":{"url":"http://www.example.com/id/1/","image":"http://placehold.it/110x110","title":"Title","type":"page"}},"private":"false","message":"This is an update"}' \
https://www.yammer.com/api/v1/activity.json
问题是现在来自第 1 步的原始消息:
- 不再链接到实际内容(它链接到 https://www.yammer.com/{network}/graph/{id})
- 图像丢失(现在是 mug0.assets-yammer.com/mugshot/images/75x75/3rd_party.png)
顺便说一句,打开图 object 不会针对 activity post 中提供的新图像进行更新(110x110 与 100x100)。文档 (https://developer.yammer.com/v1.0/docs/open-graph) 说 "when an OG object exists (with the same URL), it is updated appropriately."
在一个示例中,您将开放图对象设置为私有,另一个设置为 public。这可能会导致您看到的奇怪问题。 "og_private=true"