简体   繁体   English

Facebook API Javascript发布到朋友墙

[英]Facebook api Javascript post to friends wall

So i got this js code: 所以我得到了这个js代码:

FB.ui({ 
    method:'feed',
    from: $('.j-login-user').data('id'),
    to: userId,
}, function(response) {

My question is, can i post to multiple friends at the same time? 我的问题是,我可以同时发给多个朋友吗?

If so, how? 如果是这样,怎么办? So far i try: 到目前为止,我尝试:

FB.ui({ 
    method:'feed',
    from: $('.j-login-user').data('id'),
    to: 1234, 12334,
}, function(response) {

And

FB.ui({ 
    method:'feed',
    from: $('.j-login-user').data('id'),
    to: [1234, 12334],
}, function(response) {

But they both return this FB msg: 但是它们都返回以下FB消息:

API Error Code: 100
API Error Description: Invalid parameter
Error Message: 4302516,842604 does not resolve to a valid user ID

Don't think you can do more than one 不要以为你可以做很多

the documentation refers to 'username or id' in singular https://developers.facebook.com/docs/reference/dialogs/feed/ 该文档以单数https://developers.facebook.com/docs/reference/dialogs/feed/指代“用户名或ID”

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

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