Java 类com.facebook.widget.WebDialog 实例源码

项目:AndroidBackendlessChat    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:chat-sdk-android-push-firebase    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:BrillaMXAndroid    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:IPRJapp    文件:Home_Fragment.java   
private void share_caip() {

    Session session = Session.getActiveSession();
  if (session != null){
  String sesija = session.toString();
  Log.w ("ss", sesija);}

final MySQLiteHelper db = new MySQLiteHelper(getActivity());

  List<Avisos_Caip> avisos = db.getAllAvisos();  
    int listcounter=0;
  Avisos_Caip avi = avisos.get(listcounter);
  aviso = avi.getTitle();

     Bundle bundle = new Bundle();
     bundle.putString("caption", "Fique informado!");
     bundle.putString("description", aviso);
     bundle.putString("name", "Aviso do Caip IPRJ");
     bundle.putString("picture", "http://www.labcor.iprj.uerj.br/imagens/logo_uerj.jpg");

     new WebDialog.FeedDialogBuilder(this.getActivity(), session, bundle).build().show();
 }
项目:IPRJapp    文件:Home_Fragment.java   
private void share_lembrete() {

    Session session = Session.getActiveSession();
   if (session != null){
   String sesija = session.toString();
   Log.w ("ss", sesija);}

final MySQLiteHelper db = new MySQLiteHelper(getActivity());
List<Atividade> ativ = db.getAllAtividades(); 
int listcounter=0;
Atividade atv = ativ.get(listcounter);            
lembretes = atv.getTitle();

      Bundle bundle = new Bundle();
      bundle.putString("caption", "Lembrete Importante!");
      bundle.putString("description", lembretes);
      bundle.putString("name", "Minhas Atividades");
      bundle.putString("picture", "http://www.labcor.iprj.uerj.br/imagens/logo_uerj.jpg");

      new WebDialog.FeedDialogBuilder(this.getActivity(), session, bundle).build().show();
  }
项目:IPRJapp    文件:Home_Fragment.java   
private void share_aviso_prof() {

    Session session = Session.getActiveSession();
    if (session != null){
    String sesija = session.toString();
    Log.w ("ss", sesija);}

    final MySQLiteHelper db = new MySQLiteHelper(getActivity());
    List<Atividade> ativ = db.getAllAtividades(); 
    int listcounter=0;
    Atividade atv = ativ.get(listcounter);            
    lembretes = atv.getTitle();

    Bundle bundle = new Bundle();
    bundle.putString("caption", "Fique Informado!");
    bundle.putString("description", aviso_professor);
    bundle.putString("name", "Mural do Professor");
    bundle.putString("picture", "http://www.labcor.iprj.uerj.br/imagens/logo_uerj.jpg");

    new WebDialog.FeedDialogBuilder(this.getActivity(), session, bundle).build().show();
}
项目:IPRJapp    文件:Left_Menu.java   
private void sendRequestDialog() {

      Bundle params = new Bundle();
      params.putString("title", "Solicitação de Aplicativo");
      params.putString("message", "Experimente o IPRJapp");
      params.putString("link","https://play.google.com/store/apps/details?id=com.wb.goog.batman.brawler2013");
      params.putString("data",
          "{\"badge_of_awesomeness\":\"1\"," +
          "\"social_karma\":\"5\"}");  

      WebDialog requestsDialog = (
          new WebDialog.RequestsDialogBuilder(this.getActivity(), Session.getActiveSession(), params))
              .setOnCompleteListener(new OnCompleteListener() {

                  @Override
                  public void onComplete(Bundle values, FacebookException error) {
                  }

              })
              .build();
      requestsDialog.show();
  }
项目:TP-Formation-Android    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:AutoTimeHelper    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:snake-game-aws    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:BrainStudio    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:Team-Alice    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:Socialite    文件:FacebookConnector.java   
public void publishFeedDialog(String name, String caption, String description, String linkUrl, String pictureUrl, OnCompleteListener onPostCompleteListener) {
    if(facebook.isSessionValid()) {
        Bundle params = new Bundle();
        params.putString("name", name);
        params.putString("caption", caption);
        params.putString("description", description);
        params.putString("link", linkUrl);
        params.putString("picture", pictureUrl);

        WebDialog feedDialog = (
                new WebDialog.FeedDialogBuilder(activity,
                        facebook.getSession(),
                        params))
                        .setOnCompleteListener(onPostCompleteListener)
                        .build();
        feedDialog.show();
    }
}
项目:WatsiAndroidApp    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:Qtino.SharingKit    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:smartenit    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:DualRunner    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:ShopAfter    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:MeNextAndroid    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:ClassParticipation2    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:Nefete    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:PetTinder    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:StoryTeller    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:HereAStory-Android    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:android-skeleton-project    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:FacebookImageShareIntent    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:stepout    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:Abelana-Android    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:localhost-android    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:facebook-api-android-maven    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RESPONSE_TYPE, ServerProtocol.DIALOG_RESPONSE_TYPE_TOKEN);
    parameters.putString(ServerProtocol.DIALOG_PARAM_RETURN_SCOPES, ServerProtocol.DIALOG_RETURN_SCOPES_TRUE);

    // Only set the rerequest auth type for non legacy requests
    if (isRerequest && !Settings.getPlatformCompatibilityEnabled()) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_AUTH_TYPE, ServerProtocol.DIALOG_REREQUEST_AUTH_TYPE);
    }

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:FacebookShareDialog    文件:FacebookShareDialogFragment.java   
@Override
public Dialog onCreateDialog(final Bundle savedInstanceState) {
    final FacebookShareDialogFragment parentFragment = (FacebookShareDialogFragment)getParentFragment();
    final Payload payload = parentFragment.getPayload();
    return new WebDialog.FeedDialogBuilder(getActivity(), Session.getActiveSession())
        .setCaption(payload.getCaption())
        .setDescription(payload.getDescription())
        .setLink(payload.getLink())
        .setName(payload.getName())
        .setPicture(payload.getPicture())
        .setOnCompleteListener(new WebDialog.OnCompleteListener() {
            @Override
            public void onComplete(final Bundle values, final FacebookException error) {
                parentFragment.onShareFinished();
            }
        })
        .build();
}
项目:cusnews    文件:NotificationShareService.java   
private void share( Intent intent ) {
    Entry entry = (Entry) intent.getSerializableExtra( EXTRAS_SHARED_ENTRY );

    switch( intent.getIntExtra( EXTRAS_TYPE, TYPE_NORMAL ) ) {
        case TYPE_FACEBOOK:
            Bundle postParams = new Bundle();
            final WebDialog fbDlg = new WebDialog.FeedDialogBuilder(
                    NotificationShareService.this, getString( R.string.applicationId ), postParams ).setCaption( entry.getTitle() )
                    .setDescription( entry.getKwic() ).setLink( mSharedEntryUrl ).build();
            fbDlg.setOnCompleteListener( new OnCompleteListener() {
                @Override
                public void onComplete( Bundle bundle, FacebookException e ) {
                    fbDlg.dismiss();
                    ActivityCompat.finishAfterTransition( NotificationShareService.this );
                }
            } );
            fbDlg.show();
            break;
        default:
            String subject = getString( R.string.lbl_share_entry_title, getString( R.string.application_name ), entry.getTitle() );
            String text = getString( R.string.lbl_share_entry_content, entry.getKwic(), mSharedEntryUrl,
                                     Prefs.getInstance().getAppDownloadInfo()
            );
            Intent i = com.chopping.utils.Utils.getShareInformation( subject, text );
            i.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_BROUGHT_TO_FRONT );
            startActivity( i );
            ActivityCompat.finishAfterTransition( NotificationShareService.this );
            break;
    }
}
项目:yelo-android    文件:AuthorizationClient.java   
@Override
boolean tryAuthorize(final AuthorizationRequest request) {
    applicationId = request.getApplicationId();
    Bundle parameters = new Bundle();
    if (!Utility.isNullOrEmpty(request.getPermissions())) {
        String scope = TextUtils.join(",", request.getPermissions());
        parameters.putString(ServerProtocol.DIALOG_PARAM_SCOPE, scope);
        addLoggingExtra(ServerProtocol.DIALOG_PARAM_SCOPE, scope);
    }

    String previousToken = request.getPreviousAccessToken();
    if (!Utility.isNullOrEmpty(previousToken) && (previousToken.equals(loadCookieToken()))) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_ACCESS_TOKEN, previousToken);
        // Don't log the actual access token, just its presence or absence.
        addLoggingExtra(ServerProtocol.DIALOG_PARAM_ACCESS_TOKEN, AppEventsConstants.EVENT_PARAM_VALUE_YES);
    } else {
        // The call to clear cookies will create the first instance of CookieSyncManager if necessary
        Utility.clearFacebookCookies(context);
        addLoggingExtra(ServerProtocol.DIALOG_PARAM_ACCESS_TOKEN, AppEventsConstants.EVENT_PARAM_VALUE_NO);
    }

    WebDialog.OnCompleteListener listener = new WebDialog.OnCompleteListener() {
        @Override
        public void onComplete(Bundle values, FacebookException error) {
            onWebDialogComplete(request, values, error);
        }
    };

    e2e = getE2E();
    addLoggingExtra(ServerProtocol.DIALOG_PARAM_E2E, e2e);

    WebDialog.Builder builder =
            new AuthDialogBuilder(getStartActivityDelegate().getActivityContext(), applicationId, parameters)
                    .setE2E(e2e)
                    .setOnCompleteListener(listener);
    loginDialog = builder.build();
    loginDialog.show();

    return true;
}
项目:yelo-android    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:BrillaMXAndroid    文件:FacebookWebFallbackDialog.java   
public static boolean presentWebFallback(final Context context,
                                         String dialogUrl,
                                         String applicationId,
                                         final FacebookDialog.PendingCall appCall,
                                         final FacebookDialog.Callback callback) {
    if (Utility.isNullOrEmpty(dialogUrl)) {
        return false;
    }

    String redirectUrl = String.format("fb%s://bridge/", applicationId);

    // Show the webdialog.
    FacebookWebFallbackDialog fallbackWebDialog = new FacebookWebFallbackDialog(
            context, dialogUrl, redirectUrl);
    fallbackWebDialog.setOnCompleteListener(new WebDialog.OnCompleteListener() {
        @Override
        public void onComplete(Bundle values, FacebookException error) {
            Intent dummyIntent = new Intent();
            dummyIntent.putExtras(values == null ? new Bundle() : values);
            FacebookDialog.handleActivityResult(
                    context,
                    appCall,
                    appCall.getRequestCode(),
                    dummyIntent,
                    callback);
        }
    });

    fallbackWebDialog.show();
    return true;
}
项目:aquaplay    文件:AuthorizationClient.java   
@Override
boolean tryAuthorize(final AuthorizationRequest request) {
    applicationId = request.getApplicationId();
    Bundle parameters = new Bundle();
    if (!Utility.isNullOrEmpty(request.getPermissions())) {
        String scope = TextUtils.join(",", request.getPermissions());
        parameters.putString(ServerProtocol.DIALOG_PARAM_SCOPE, scope);
        addLoggingExtra(ServerProtocol.DIALOG_PARAM_SCOPE, scope);
    }

    String previousToken = request.getPreviousAccessToken();
    if (!Utility.isNullOrEmpty(previousToken) && (previousToken.equals(loadCookieToken()))) {
        parameters.putString(ServerProtocol.DIALOG_PARAM_ACCESS_TOKEN, previousToken);
        // Don't log the actual access token, just its presence or absence.
        addLoggingExtra(ServerProtocol.DIALOG_PARAM_ACCESS_TOKEN, AppEventsConstants.EVENT_PARAM_VALUE_YES);
    } else {
        // The call to clear cookies will create the first instance of CookieSyncManager if necessary
        Utility.clearFacebookCookies(context);
        addLoggingExtra(ServerProtocol.DIALOG_PARAM_ACCESS_TOKEN, AppEventsConstants.EVENT_PARAM_VALUE_NO);
    }

    WebDialog.OnCompleteListener listener = new WebDialog.OnCompleteListener() {
        @Override
        public void onComplete(Bundle values, FacebookException error) {
            onWebDialogComplete(request, values, error);
        }
    };

    e2e = getE2E();
    addLoggingExtra(ServerProtocol.DIALOG_PARAM_E2E, e2e);

    WebDialog.Builder builder =
            new AuthDialogBuilder(getStartActivityDelegate().getActivityContext(), applicationId, parameters)
                    .setE2E(e2e)
                    .setOnCompleteListener(listener);
    loginDialog = builder.build();
    loginDialog.show();

    return true;
}
项目:aquaplay    文件:AuthorizationClient.java   
@Override
public WebDialog build() {
    Bundle parameters = getParameters();
    parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI);
    parameters.putString(ServerProtocol.DIALOG_PARAM_CLIENT_ID, getApplicationId());
    parameters.putString(ServerProtocol.DIALOG_PARAM_E2E, e2e);

    return new WebDialog(getContext(), OAUTH_DIALOG, parameters, getTheme(), getListener());
}
项目:TP-Formation-Android    文件:FacebookWebFallbackDialog.java   
public static boolean presentWebFallback(final Context context,
                                         String dialogUrl,
                                         String applicationId,
                                         final FacebookDialog.PendingCall appCall,
                                         final FacebookDialog.Callback callback) {
    if (Utility.isNullOrEmpty(dialogUrl)) {
        return false;
    }

    String redirectUrl = String.format("fb%s://bridge/", applicationId);

    // Show the webdialog.
    FacebookWebFallbackDialog fallbackWebDialog = new FacebookWebFallbackDialog(
            context, dialogUrl, redirectUrl);
    fallbackWebDialog.setOnCompleteListener(new WebDialog.OnCompleteListener() {
        @Override
        public void onComplete(Bundle values, FacebookException error) {
            Intent dummyIntent = new Intent();
            dummyIntent.putExtras(values == null ? new Bundle() : values);
            FacebookDialog.handleActivityResult(
                    context,
                    appCall,
                    appCall.getRequestCode(),
                    dummyIntent,
                    callback);
        }
    });

    fallbackWebDialog.show();
    return true;
}
项目:AutoTimeHelper    文件:FacebookWebFallbackDialog.java   
public static boolean presentWebFallback(final Context context,
                                         String dialogUrl,
                                         String applicationId,
                                         final FacebookDialog.PendingCall appCall,
                                         final FacebookDialog.Callback callback) {
    if (Utility.isNullOrEmpty(dialogUrl)) {
        return false;
    }

    String redirectUrl = String.format("fb%s://bridge/", applicationId);

    // Show the webdialog.
    FacebookWebFallbackDialog fallbackWebDialog = new FacebookWebFallbackDialog(
            context, dialogUrl, redirectUrl);
    fallbackWebDialog.setOnCompleteListener(new WebDialog.OnCompleteListener() {
        @Override
        public void onComplete(Bundle values, FacebookException error) {
            Intent dummyIntent = new Intent();
            dummyIntent.putExtras(values == null ? new Bundle() : values);
            FacebookDialog.handleActivityResult(
                    context,
                    appCall,
                    appCall.getRequestCode(),
                    dummyIntent,
                    callback);
        }
    });

    fallbackWebDialog.show();
    return true;
}
项目:BrainStudio    文件:FacebookWebFallbackDialog.java   
public static boolean presentWebFallback(final Context context,
                                         String dialogUrl,
                                         String applicationId,
                                         final FacebookDialog.PendingCall appCall,
                                         final FacebookDialog.Callback callback) {
    if (Utility.isNullOrEmpty(dialogUrl)) {
        return false;
    }

    String redirectUrl = String.format("fb%s://bridge/", applicationId);

    // Show the webdialog.
    FacebookWebFallbackDialog fallbackWebDialog = new FacebookWebFallbackDialog(
            context, dialogUrl, redirectUrl);
    fallbackWebDialog.setOnCompleteListener(new WebDialog.OnCompleteListener() {
        @Override
        public void onComplete(Bundle values, FacebookException error) {
            Intent dummyIntent = new Intent();
            dummyIntent.putExtras(values == null ? new Bundle() : values);
            FacebookDialog.handleActivityResult(
                    context,
                    appCall,
                    appCall.getRequestCode(),
                    dummyIntent,
                    callback);
        }
    });

    fallbackWebDialog.show();
    return true;
}