【问题标题】:how to post object to facebook user wall?如何将对象发布到 facebook 用户墙?
【发布时间】:2014-02-27 08:52:14
【问题描述】:

我正在使用 Facebook JavaScript SDK,此代码用于登录并将对象发布到用户的墙上,这会返回错误,

{"error":{"message":"(#200) You do not have sufficient to permissions to perform this action","type":"OAuthException","code":200}}

FB.login(function(data){ if(data.authResponse){ facebookGetDetails(); }else{
console.log("Login operation aborted"); } },{scope: 'email,publish_actions,read_stream'});

FB.api( '/me', 'post', { app_id: xxxxxxxxxxxx, type: "business.business", url: url, title: title, image: picUrl, contact_data: "Bangalore, India", location: "17.024522", description: desc }, function(response) { console.log(JSON.stringify(response)); // handle the response });

以下代码有效,但它只发布到活动流,而不是墙。

FB.api( 'me/namespace:review', 'post', { business: "http://samples.ogp.me/616004095080596" }, function(response) { // handle the response } );

【问题讨论】:

    标签: javascript facebook facebook-graph-api


    【解决方案1】:

    我猜你在这里使用的端点 URL 不完整

    FB.api(
        '/me',
        ...
    );
    

    您应该调用 /me/feed 并发送帖子请求,如下所述:https://developers.facebook.com/docs/graph-api/reference/user/feed/#publish

    【讨论】:

      猜你喜欢
      • 2012-11-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-15
      • 1970-01-01
      相关资源
      最近更新 更多