0

当我运行创建页面选项卡的函数时,我收到来自 Facebook API 的对象形式的响应。

我运行的功能:

   FB.ui({
      method: 'pagetab',
      redirect_uri: 'http://www.google.com'
    }, function(response){
        console.log(response.tabs_added)
    });

console.log(response.tabs_added)这之后是什么回来:

Object {491585370876358: true}

491585370876358是页面的ID 。我怎样才能隔离这个值?

我想它会是 console.log(response.tabs_added / .something here /);

4

1 回答 1

1

类似的东西怎么样:

for(var key in obj){
   keys.push(key);
}

仅限于第一次运行?

我想那将是:

var firstProp;
for(var key in object){
    if(object.hasOwnProperty(key)){
        firstProp = key;
        break;
    }
}

不知道我是否喜欢这样......

于 2013-08-04T10:59:39.557 回答