- Home /
Question by
BDCJR · Jan 20, 2015 at 09:44 AM ·
facebooknotificationsocialrequestsocial networking
Unity Facebook Invitation Notification?
Hi, I have searched on google and I did not found any solution for my problem. I can send invitation that appears on https://www.facebook.com/appcenter/requests but never gets in the notification bar. On facebook in dashboard the game is public and I have this message "This app is public and available to all users". From the iOS and Android platforms user can connect with success to facebook so facebook setting should be correct. I'm stuck with this so any help will be apreciated. Thank you!
public void InviteFriends()
{
string FriendSelectorTitle = "";
string FriendSelectorMessage = TextManager.Instance.fb_INVITE_MESSAGE1;
string FriendSelectorFilters = "[\"app_users\"]";
string FriendSelectorData = "{}";
string FriendSelectorExcludeIds = "";
string FriendSelectorMax = "5";
// If there's a Max Recipients specified, include it
int? maxRecipients = null;
if (FriendSelectorMax != ""){
try{maxRecipients = int.Parse(FriendSelectorMax);}
catch (System.Exception e){print(e.Message);}
}
// include the exclude ids
string[] excludeIds = (FriendSelectorExcludeIds == "") ? null : FriendSelectorExcludeIds.Split(',');
List<object> FriendSelectorFiltersArr = null;
if (!System.String.IsNullOrEmpty(FriendSelectorFilters)){
try{FriendSelectorFiltersArr = Facebook.MiniJSON.Json.Deserialize(FriendSelectorFilters) as List<object>;}
catch{throw new System.Exception("JSON Parse error");}
}
FB.AppRequest(
FriendSelectorMessage,
null,
FriendSelectorFiltersArr,
excludeIds,
maxRecipients,
FriendSelectorData,
FriendSelectorTitle,
HandleInvitationFacebook
);
DataStorage.Instance.Pause(true);
}
Comment