yammer集成: - 使用open_graph编写活动

时间:2015-11-23 11:02:54

标签: opengraph yammer

在编写活动时,它会返回异常 ex {“远程服务器返回错误:(400)错误请求。”}

我正在使用以下代码: -

html

在我尝试在yammer网络上编写活动之后,我获得了访问令牌。enter image description here

图像显示了函数局部变量的内容。

1 个答案:

答案 0 :(得分:0)

检查以下代码:

           yam.platform.request({
                url: "activity.json", 
                method: "GET",
                data: {
                    "activity": {
                        "actor": { "name": "name", "email": "name@domain.onmicrosoft.com" },
                        "action": "create",
                        "object": {
                            "url": "https://www.news.google.com",
                            "image": "url",
                            "description": "Testing Description",
                            "title": "Open Graph Title"
                        },
                        "private": "false",
                        "message": "testing commit"
                    }
                },
                success: function (activity) { 
                    console.log("Activity request was successful.");
                },
                error: function (activity) {
                    console.error("There was an error with the request.");
                }
            });