Reputation: 935
I'm trying to use a 'requests' facebook dialog in my Android application. The facebook tutorial is pretty straightforward:(http://developers.facebook.com/docs/mobile/android/build/ — search for 'request dialog')
supposedly, it is just a line of code to display a dialog with the list of your friends where you can select the ones you want to send invitations to:
//Send requests with no friend pre-selected and user
//selects friends on the dialog screen.
mFacebook.dialog(context, "apprequests", new AppRequestsListener());
//send request to a particular friend.
Bundle params = new Bundle();
params.putString("to", "");
mFacebook.dialog(context, "apprequests", new AppRequestsListener());
Except for the apparent typo (they missed to pass the params Bundle to the functions in the second case), everything looks good. So I tried both variants and the response I'm getting from Facebook is always the same:
An error occurred with AppName. Please try again later. API code: 100. API error description: Invalid parameter. Error message: The parameter message is required.
am I doing something wrong or is it Facebook that is screwed up?
Upvotes: 0
Views: 1193
Reputation: 548
Just had to do the very same thing. The error message is pointing you to the message body that is missing. The revised code (below) did the trick for me.
Bundle params = new Bundle();
params.putString("message", "This is the message text");
mFacebook.dialog(context, "apprequests", params, new AppRequestsListener());
Hope this helps!
Upvotes: 1