繁体   English   中英

如何将对象发布到Facebook用户墙?

[英]how to post object to facebook user wall?

我正在使用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 } );

我想您在这里使用的端点URL不完整

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

您应该使用以下所述的发帖请求致电/ me / feedhttps : //developers.facebook.com/docs/graph-api/reference/user/feed/#publish

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM