首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Facebook应用程序在管理墙上发布JSSDK

Facebook应用程序在管理墙上发布JSSDK
EN

Stack Overflow用户
提问于 2012-03-22 15:11:45
回答 1查看 328关注 0票数 0

我是FB开发的新手,但我已经在这上面挣扎了几个小时。

我在我的博客上实现了fb评论,我试图让应用程序在每次有人向博客添加评论时通知我。

正如我所读到的,应用程序是不允许发送消息的,而且我找不到在通知栏中获取信息的方法,我觉得可以接受的方式是从应用程序在我的墙上发一篇帖子。

我一直在努力解决这个问题:

代码语言:javascript
复制
window.fbAsyncInit = function ()  
{   
   FB.init({  
       appId      : 'xxxxxxx', // App ID  
       status     : true, // check login status  
       cookie     : true, // enable cookies to allow the server to access the session 
       xfbml      : true,  // parse XFBML 
       oauth: true  
    });  //end init
             FB.Event.subscribe('comment.create', function (resp) {  
             FB.api('/my id/feed', 'post',  {  message: 'new comment...'},
            function(resp2) {
                if (!resp2 ) {
                     alert('Sem resposta do perfil do admin' + url);
               } else if (resp2.error ){
                    alert('Erro na notificação do admin - '; + resp2.error);// always comes to here
               } else{     alert('Post ID: '; + resp2.id);   }                   });//end api
});//end subscr
};

我一直在摆弄fb.login,尽管这不是我想要的方式,还有getsetssionstatus,因为我认为它可能与权限有关,但一无所获。

另一个快速问题是,我的应用程序在我的墙上公开发布活动,我如何设置它,仅限好友?在隐私设置中似乎找不到我自己的应用程序。

EN

回答 1

Stack Overflow用户

发布于 2012-03-24 23:30:06

嗯,我把它寄出去了。JUst认为,将应用程序发布到自己的墙上会更好。让它起作用了。问题是我缺少一个访问令牌。现在我把它作为app发布到app wall上。现在的问题是,这些帖子到哪里去了?当我尝试访问Graph.ferebook.com/appid/feed时,我得到的结果是:

代码语言:javascript
复制
"data": [
      {
         "id": "appid_354550067919779",
         "from": {
            "name": "Estou ou Sou comments",
            "canvas_name": "rodcomments",
            "namespace": "rodcomments",
            "id": "appid"
         },
         "message": "Novo coment\u00e1rio no blog...http://estouousou.blogspot.pt/2012/03/definitivamente-este-mes-e-o-culminar.html",
         "type": "status",
         "application": {
            "name": "Estou ou Sou comments",
            "canvas_name": "rodcomments",
            "namespace": "rodcomments",
            "id": "appid"
         },
         "created_time": "2012-03-24T06:37:21+0000",
         "updated_time": "2012-03-24T06:37:21+0000",
         "comments": {
            "count": 0
         },
         "is_published": true
      }, .........

所以帖子就在那里...

当我访问我为应用程序创建的页面时,那里什么都没有:(我如何访问应用程序墙?

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/9817873

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档