kennylerma / facebook-actionscript-api

Automatically exported from code.google.com/p/facebook-actionscript-api
0 stars 0 forks source link

How to invite multiple friends WITHOUT multi-friend-selector? #342

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create AppRequest Object and make fb call, as such:

var appReq:AppRequest = new AppRequest();
appReq.to = [Friend FB ID, Friend FB ID, Friend FB ID];
appReq.message = "A request especially for multiple friends.";

Facebook.ui( UIMethod.APPREQUESTS, appReq.toObject(), onSendInvitesHandler);

What is the expected output? What do you see instead?
Expected: 
Invite Friend preview window should pop up...?

Instead: 
error window displays:

API Error Code: 100
API Error Description: Invalid parameter
Error Message: Too many recipients.

What version of the product are you using? On what operating system?
Flash, AS3. OSX.

Please provide any additional information below.

From the AppRequest documentation:

public var to:Array
A comma-separated list containing user IDs or usernames. If this is specified, 
the user will not have a choice of recipients. If this is omitted, the user 
will see a friend selector.

Works fine if I have only 1 friend ID in the Array. On Facebook's RequestDialog 
documentation, the "to" property is explained as a single friend ID, not a 
comma-separated list of friend ID's:

https://developers.facebook.com/docs/reference/dialogs/requests/

Since this AS3 api is presumably just a wrapper of the JavaScript SDK, does 
this share the same limitation? If so please modify the documentation to 
reflect this, as it's led me to hours of researching and debugging, to no 
avail...

Original issue reported on code.google.com by jeremyt...@gmail.com on 26 Aug 2011 at 5:44

GoogleCodeExporter commented 9 years ago
The Facebook.ui call is used for multiple methods besides app requests (even in 
the Javascript API), therefore it's up to the developer to figure what proper 
params are required by researching Facebook's docs.

Original comment by rovertn...@gmail.com on 29 Aug 2011 at 4:41

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi rovertnnud,

That's all good, and I understand that it's up to the developer to do the right 
calls.

However, it seems to me that it's your documentation that may(?) be in error. 
The docs at:

http://yourpalmark.github.com/facebook-actionscript-api/docs/

...mentions that the "to" property is "A comma-separated list containing user 
IDs or usernames."

Meanwhile, the official Facebook docs at the previous url describes it as a 
singular item:

"A user ID or username. This may or may not be a friend of the user. If this is 
specified, the user will not have a choice of recipients. If this is omitted, 
the user will see a friend selector and will be able to select a maximum of 50 
recipients. (Due to URL length restrictions, the maximum number of recipients 
is 25 in IE7 and also in IE8+ when using a non-iframe dialog.)"

To date, I have only been able to get it to work with a single Facebook ID. 
Perhaps I'm looking at the wrong documentation for someone else's package with 
an identical name? If so, my apologies.

Original comment by jeremyt...@gmail.com on 29 Aug 2011 at 9:35

GoogleCodeExporter commented 9 years ago
Ya, yourpalmark is an active contributor to the FB for Actionscript API, but 
his docs are not the official ones, sorry. You can find the official ones at:

http://facebook-actionscript-api.googlecode.com/svn/release/current/docs/index.h
tml

Original comment by rovertn...@gmail.com on 29 Aug 2011 at 9:42

GoogleCodeExporter commented 9 years ago
Many thanks!

Original comment by jeremyt...@gmail.com on 29 Aug 2011 at 11:30

GoogleCodeExporter commented 9 years ago
Is there another solution to this issue or is simply not possible to send app 
invitations to a set of (predefined) multiple friends without displaying the 
friend-selector dialog?

Original comment by andre.se...@gmail.com on 27 Sep 2011 at 9:15

GoogleCodeExporter commented 9 years ago
Unfortunately, it doesn't look like it. After scouring the web and consulting 
multipledevelopers, it ends up that you either use the multi-friend selector or 
you have to make multiple individual calls. TjeOld REST API version used to be 
able to do this but has since been deprecated.

Original comment by jeremyt...@gmail.com on 27 Sep 2011 at 3:56