Facebook graph api Facebook Graph apprequest JSON响应
使用+Sencha Touch获取无效的JSON响应: {“请求”:“12345678”,“致%5B0%5D”:“12345678”} 看起来有一些错误的编码试图返回“to”数组Facebook graph api Facebook Graph apprequest JSON响应,facebook-graph-api,cordova,sencha-touch-2,Facebook Graph Api,Cordova,Sencha Touch 2,使用+Sencha Touch获取无效的JSON响应: {“请求”:“12345678”,“致%5B0%5D”:“12345678”} 看起来有一些错误的编码试图返回“to”数组 FB.ui({ method: 'apprequests', message: (msg) ? msg : 'Start using MyApp', display: 'touch' }, function(response) {
FB.ui({
method: 'apprequests',
message: (msg) ? msg : 'Start using MyApp',
display: 'touch'
},
function(response) {
console.log(JSON.stringify(response));
if(response) {
} else {
console.log('Error parsing FB request response');
}
});
谢谢,
Steve在尝试了两个不同的短期补丁后,我决定对对象进行简单的迭代以解析出用户ID。以防这有助于某人移动,直到修复为止
response.to = [];
for(var prop in response){
if(prop != 'request'){
response.to.push(response[prop]);
}
}