如何与hello.js共享数据



我可以使用hello.js登录以及获取用户数据(/me)和相册(/me/albums),但我没有来自/share端点的数据。

例:

hello.init({
  facebook : 'SECRET'
}, {scope: 'friends,photos' });

hello.on('auth.login', function(auth){
  hello( auth.network ).api( '/me' ).then( function(r){
    console.log("User data is: ");
    console.log(r);
  });
  hello( auth.network ).api( '/me/share' ).then( function(r){
    console.log("Share data is: ");
    console.log(r);
  },function(e){
    console.log("ERROR: "+e);
  });
});

这导致:

User data is: 
Object {first_name: "Lucy"} (edited to save space)
Share data is: 
Object {data: Array[0]}

所以我能够成功登录 hello.js ,但无法访问共享数据。我的代码中缺少什么吗?我需要在某处更新权限吗?

FB表示,要求提供公开个人资料只会提供以下内容:

    您的
  • 姓名、用户 ID、用户名、个人资料图片、性别和网络,以便识别您的身份
  • 您的年龄范围、语言和国家/地区,以便个性化体验

因此,我希望我需要请求权限才能查看用户的状态。但是hello.js权限文档中似乎没有任何需要澄清的内容。

Facebook需要先将您的应用程序列入白名单,然后您才能检索我/状态或我/提要结果。

最新更新