[英]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 / feed : https : //developers.facebook.com/docs/graph-api/reference/user/feed/#publish
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.