We are using the following to connect to facebook:
public static void ConnectWithFacebook(){
string[] perms = new string[10];
perms [0] = FBPerms.email;
perms [1] = FBPerms.user_friends;
AppConstants.BuildSocialService().DoFBOAuthAndGetToken(AppConstants.FB_APP_ID, perms, false, new FB_CallBack());
}
Its callback is as followings:
public void OnSuccess (object response)
{
if (response is string){
FB_CallBack.fbAccessToken = response.ToString();
FB_CallBack.isConnected = true;
Loading.loadingMsg = "Successfully connected to Facebook";
}
if (response is com.shephertz.app42.paas.sdk.csharp.social.Social){
com.shephertz.app42.paas.sdk.csharp.social.Social socialObj = (com.shephertz.app42.paas.sdk.csharp.social.Social)response;
FB_CallBack.fbUserId = socialObj.GetFacebookProfile().GetId();
FB_CallBack.fbUserName = socialObj.GetFacebookProfile().GetName();
FB_CallBack.fbUserProfilePic = socialObj.GetFacebookProfile().GetPicture();
storeUserCheck.requestUserCheck();
}
}
If the first time we don't allow the permission to play the app in Facebook, it does not redirect to Facebook the second time it connects to Facebook. It also does not throw any exception.
May I know how to make it redirect to Facebook so that user can allow the permission to play in Facebook for the second time if does not allow the permission the first time?
closed with the note:
Solved