Reputation: 93
When i'm sending single facebook id to Bundle Parameters its working well. but i sent multiple ids like this(100000000000,2000000000000,300000000000), in this reason not working.
Here is Error : This dialog has been passed bad parameter API Error Code : 100 API Error Description : Invalid Parameter Error Message : 10000000000,20000000000000,3000000000000
Here is My Code :
Bundle parameters = new Bundle();
// Get the friend ids
String friendsIdsInFormat = "";
for(int i=0; i<facebookids.size()-1; i++){
friendsIdsInFormat = friendsIdsInFormat + facebookids.get(i) + ",";
}
friendsIdsInFormat = friendsIdsInFormat + facebookids.get(facebookids.size()-1);
Log.v("vvvv", "--------fb invite ids---------"+friendsIdsInFormat);
parameters.putString("to", friendsIdsInFormat);
parameters.putString("link", "http://play.google.com/store/apps/details?id="+getPackageName());
parameters.putString( "description", "Come check me out on XXXX !!!!\nThe Stampd Mobile App has the reconneting the people in the world!\nClick Play Store link and download this free app and start connecting the people today !!");
// Show dialog for invitation
facebook.dialog(getParent(), "stream.publish", parameters, new Facebook.DialogListener() {
@Override
public void onComplete(Bundle values) {
// TODO Auto-generated method stub
}
@Override
public void onFacebookError(FacebookError e) {
// TODO Auto-generated method stub
}
@Override
public void onError(DialogError e) {
// TODO Auto-generated method stub
}
@Override
public void onCancel() {
// TODO Auto-generated method stub
}
});
Upvotes: 0
Views: 2113
Reputation: 1557
Check if you are passing a invalid url or url with space in the parameters. I got this error, due to invalid url.
Upvotes: 0
Reputation: 4936
This happened to me, and as the dialog suggested, it indeed was a bad parameter.
I was using FB SDK for unity. The culprit was the feed "reference" - it was supposed to be "Games"- and i accidentally passed a localized equivalent of the word "Games" - once i changed it to be english it worked fine.
Check your parameters and see if that helps.
Upvotes: 1