0

我正在尝试使用以下 javascript 代码发布操作:

FB.api('/me/spacemaze:fly_through',
'post',
{maze: 'http://www.gethugames.in/html5spacemaze/', lid: state.currentLevel, score: 1001},
function(resp) {
    if(!resp || resp.error) {
        console.log('err occured');
        console.log(resp.error);
    } else {
        console.log('successfull action');
        console.log(resp);
    }
});

但是请求失败并得到以下错误:

code: 1
message: "An unknown error has occurred."
type: "OAuthException"

在 Open Graph Dashboard 中,fly_through定义为具有 2 个自定义属性lid和类型score的操作。是一个对象,我还没有创建任何聚合。floatMaze

我的代码有什么问题?

编辑1:

我得到了一个访问令牌,在访问令牌调试器中验证它是有效的,但问题字段显示未知。不确定这是否有问题。

然后在 Graph API Explorer 中,我发布了一个包含以下字段的查询

URL: me/spacemaze:fly_through
maze: http://www.gethugames.in/html5spacemaze
lid: 5
score: 10.1

但得到同样的错误:

"error": {
"message": "An unknown error has occurred.", 
"type": "OAuthException", 
"code": 1
}

PS:我获得了扩展权限publish_streamread_stream扩展权限。还不够吗?

4

0 回答 0