javascript Facebook js sdk:“选择一个朋友”对话框,然后发布到他们的墙上?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5160851/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Facebook js sdk: "select a friend" dialog, then post to their wall?
提问by kroe
Needs to resolve that procedure.
需要解决那个程序。
Now using the new javascript sdk, inside my "iframe tab".
现在在我的“iframe 选项卡”中使用新的 javascript sdk。
Select friend(s)
Post in their wall.
选择朋友
在他们的墙上张贴。
1: not solved
1:未解决
I couldn't find a way of poping a "select a friend" dialog, trough the new api. The only mention in FB.ui is about a "friends dialog" used to "invite a friend".
Maybe I need a dialog ( which one ) to select a friend and than post? Ideally multi-friend selector so I can post to as many friends as a user can choose?
我找不到通过新 api 弹出“选择朋友”对话框的方法。FB.ui 中唯一提到的是用于“邀请朋友”的“朋友对话框”。
也许我需要一个对话框(哪个)来选择一个朋友而不是发布?理想情况下是多朋友选择器,以便我可以向用户选择的尽可能多的朋友发帖?
2: solved
2:解决了
( any other solution is welcome )
To post in a friends wall, I can simply fill the "to" param of the "feed dialog" as explained here: http://developers.facebook.com/docs/reference/dialogs/feed/
(欢迎任何其他解决方案)
要在朋友墙上发帖,我可以简单地填写“提要对话框”的“到”参数,如下所述:http: //developers.facebook.com/docs/reference/dialogs/feed/
Some not so elegant solutions I found:
我发现了一些不太优雅的解决方案:
ask access to manage user friends then:
要求访问管理用户朋友然后:
Do the multi selection pop up by myself
looks like redoing the wheel, some FBML pages solved that problem with a simple feed dialog with friend selector, as you can see here: http://www.facebook.com/chanel
Use a jquery plugin that parses the friends list and do the dialog for me
looks like a overkill / not working very well
自己做多选弹出
看起来像重做轮子,一些 FBML 页面通过一个简单的带有朋友选择器的提要对话框解决了这个问题,你可以在这里看到:http: //www.facebook.com/chanel
使用解析好友列表的jquery插件并为我做对话框
看起来有点矫枉过正/效果不佳
I feel like I'm missing something ( this is my second work with the new js sdk ), such a easy task should be pretty straight forward to solve.
我觉得我错过了一些东西(这是我使用新 js sdk 的第二个工作),这样一个简单的任务应该很容易解决。
回答by dwarfy
To "invite friend" you have to look there : http://developers.facebook.com/docs/reference/dialogs/requests/
要“邀请朋友”,您必须查看:http: //developers.facebook.com/docs/reference/dialogs/requests/
A simple example :
一个简单的例子:
FB.ui({method: 'apprequests', message: 'Check out my super site', title:"Invite your friends."});
Feel free to ask any question if it's not clear ..
如果不清楚,请随时提出任何问题..
回答by Tom Kincaid
You used to be able to use fb:friend-selector that would automatically autocomplete the users friends. It stopped working, so I ended up recreating it using jquery ui.
您过去可以使用 fb:friend-selector 自动完成用户好友。它停止工作,所以我最终使用 jquery ui 重新创建它。

