Package org.osforce.spring4me.social.api.service

Examples of org.osforce.spring4me.social.api.service.ApiService


  public @ResponseBody Map<String, Object> getAuthUrl(
      @RequestParam String target, WebRequest request) {
    Site site = (Site) request.getAttribute(AttributeKeys.SITE_KEY, WebRequest.SCOPE_REQUEST);
    String callback = site.getHomeURL()+ "/oauth/callback/" + target;
    String beanId = target + ApiService.class.getSimpleName();
    ApiService apiService = appContext.getBean(beanId, ApiService.class);
    OAuthService oAuthService = apiService.getOAuthService(callback);
    Token requestToken = oAuthService.getRequestToken();
    oAuthServices.put(requestToken, oAuthService);
    requestTokens.put(requestToken.getToken(), requestToken);
    String authUrl = oAuthService.getAuthorizationUrl(requestToken);
    Map<String, Object> model = CollectionUtil.newHashMap();
View Full Code Here


    String[] targets = (String[]) context.get("targets");
    if(targets!=null) {
      Activity activity = activityService.getActivity(activityId);
      for(String target : targets) {
        Token accessToken = getAccessToken(target, activity.getEnteredBy());
        ApiService apiService = getApiService(target);
        Map<String, Object> params = CollectionUtil.newHashMap();
        params.put("format", "json");
        params.put("accessToken", accessToken);
        params.put("status", activity.getDescription());
        apiService.updateStatus(params);
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.osforce.spring4me.social.api.service.ApiService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.