예제 #1
0
	/**
	 * Weme sdk loginWeme
	 * 
	 * @param oAuthString - 
	 * @param WmInterfaceBrokerDelegate
	 */
	public void loginWeme(string clientId,string clientSecret,WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		if(WemeManager.isEmpty(clientId)==true||WemeManager.isEmpty(clientSecret)==true){
			Debug.Log("must not null clientId or clientSecret");
			return;
		}
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_VALUE_PREFIX_URI+WM_HOST_WEME);
		JSONObject paramsObject = new JSONObject();
		paramsObject.Add("clientId",clientId);
		paramsObject.Add("clientSecret",clientSecret);
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #2
0
	public void loginWeme(string clientId,string clientSecret,WemeManager.WmOauthDisplayOrientation orientation,WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		if(WemeManager.isEmpty(clientId)==true||WemeManager.isEmpty(clientSecret)==true){
			Debug.Log("must not null clientId or clientSecret");
			return;
		}
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_VALUE_PREFIX_URI+WM_HOST_WEME);
		JSONObject paramsObject = new JSONObject();
		paramsObject.Add("clientId",clientId);
		paramsObject.Add("clientSecret",clientSecret);
		string orientationString = null;
		if(WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_LANDSCAPE == orientation){
			orientationString = "landscape";
		}else if(WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT == orientation){
			orientationString = "portrait";
		}
		if(orientationString!=null)
			paramsObject.Add("orientation",orientationString);
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #3
0
	public void sendPromotionClickedBI(long promotionId,WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_VALUE_PREFIX_URI+WM_HOST_PROMOTION_SENDBI);
		JSONObject paramsObject = new JSONObject();
		paramsObject.Add("promotionId",promotionId);
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #4
0
	public void requestDeviceChange(WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_DEVICE_OAUTH_VALUE_PREFIX_URI+WM_HOST_DEVICE_CHANGE);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #5
0
	/**
	 * Weme sdk loginTwitter
	 * 
	 * @param oAuthString - 
	 * @param WmInterfaceBrokerDelegate
	 */
	public void loginTwitter(string consumerKey,string consumerSecret,string callbackUrl,WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		if(WemeManager.isEmpty(consumerKey)==true||WemeManager.isEmpty(consumerSecret)==true){
			Debug.Log("must not null consumerKey or consumerSecret");
			return;
		}
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_VALUE_PREFIX_URI+WM_HOST_TWITTER);
		JSONObject paramsObject = new JSONObject();
		paramsObject.Add("consumerKey",consumerKey);
		paramsObject.Add("consumerSecret",consumerSecret);
		paramsObject.Add("callbackUrl",callbackUrl);
		
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #6
0
	/*
	 * 
	 * withdraw wemesdk
	 * weme sdk withdraw both auth withdraw
	 * not disable allow facebook or twitter
	 */
	public void withdrawWemeSdk(WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeWithdrawHandler){
		WemeManager.Instance.withdraw(_WemeWithdrawHandler);	
		
	}
예제 #7
0
	/**
	 * weme sdk Login
	 * not auth login just sdk login
	 */
	public void loginWemeSdk(WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeLoginHandler){
		
		/**
		 * weme sdk login
		 * using authProvider and authData
		 */
		string authData = UserData.Instance.authData;
		
		WemeManager.Instance.login(authData,_WemeLoginHandler);
	}
예제 #8
0
	// device login API
	public void loginDevice(WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeOauthDeviceHandler){
			WemeOAuthManager.Instance.loginDevice(_WemeOauthDeviceHandler);		
	}
예제 #9
0
	/**
	 * Weme sdk showPlatformView
	 */
	public void showPlatformView(WmPlatformViewType type,string additionalParamString, WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_PLATFORMVIEW_VALUE_PREFIX_URI+WM_HOST_SHOWPLATFORM);
		JSONObject paramsObject = new JSONObject();
		string typeString = null;
		if(WmPlatformViewType.WM_PLATFORM_VIEW_MAIN == type){
			typeString = "main";
		}else if(WmPlatformViewType.WM_PLATFORM_VIEW_EVENT == type){
			typeString = "event";
		}
		paramsObject.Add("type",typeString);
		paramsObject.Add("additionalParams",JSONObject.Parse(additionalParamString));
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #10
0
	/**
	 * Weme sdk showAgreement
	 */
	public void showAgreementView(WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_PLATFORMVIEW_VALUE_PREFIX_URI+WM_HOST_SHOWAGREEMENT);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #11
0
	public void logExpose(List<long> exposeList, WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_VALUE_PREFIX_URI+WM_HOST_PROMOTION_SEND_EXPOSELOG);
		JSONObject paramsObject = new JSONObject();
		JSONArray array = new JSONArray();
		foreach(long promoid in exposeList){
			array.Add(promoid);	
		}
		paramsObject.Add("promoIds",array);
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #12
0
	public void hideEndingPopUpPromotion(WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_PROMOTIONUI_VALUE_PREFIX_URI+WM_HOST_HIDEENDINGPOPUPPROMOTION);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #13
0
	public void showStationPromotion(WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_PROMOTIONUI_VALUE_PREFIX_URI+WM_HOST_SHOWSTATIONPROMOTION);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #14
0
	public void showEndingPopUpPromotion(WmPromotionDisplayOrientation orientation, WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject paramsObject = new JSONObject();
		string orientationString = null;
		if(WmPromotionDisplayOrientation.WM_PROMOTION_DISPLAY_ORIENTATION_LANDSCAPE == orientation){
			orientationString = "landscape";
		}else if(WmPromotionDisplayOrientation.WM_PROMOTION_DISPLAY_ORIENTATION_PORTRAIT == orientation){
			orientationString = "portrait";
		}
		paramsObject.Add("orientation",orientationString);

		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI, JSON_PROMOTIONUI_VALUE_PREFIX_URI + WM_HOST_SHOWENDINGPOPUPPROMOTION);
		jsonObject.Add(JSON_KEY_PARAMS, paramsObject);

		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(), callback);
	}
예제 #15
0
	public void showPopUpPromotion(WmPromotionDisplayOrientation orientation,WmPromotionPopupExposeStyle style,WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_PROMOTIONUI_VALUE_PREFIX_URI+WM_HOST_SHOWPOPUPPROMOTION);
		JSONObject paramsObject = new JSONObject();
		string orientationString = null;
		if(WmPromotionDisplayOrientation.WM_PROMOTION_DISPLAY_ORIENTATION_LANDSCAPE == orientation){
			orientationString = "landscape";
		}else if(WmPromotionDisplayOrientation.WM_PROMOTION_DISPLAY_ORIENTATION_PORTRAIT == orientation){
			orientationString = "portrait";
		}
		paramsObject.Add("orientation",orientationString);
		string styleString = null;
		if(WmPromotionPopupExposeStyle.WM_PROMOTION_POPUP_EXPOSE_STYLE_MULTIPLE_POPUP == style){
			styleString = "multiple";
		}else if(WmPromotionPopupExposeStyle.WM_PROMOTION_POPUP_EXPOSE_STYLE_SINGLE_POPUP == style){
			styleString = "single";
		}
		paramsObject.Add("style",styleString);
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #16
0
	/**
	 * login Naver 
	 */
	
	public void loginNaver(WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeOauthNaverHandler, int _orientation = 0){
		
		/**
		 * Naver auth client keys
		 */
		string clientId = WemeSdkManager.Instance.naver_clientId_;
		string clientSecret = WemeSdkManager.Instance.naver_clientSecret_;
		string redirectUri = WemeSdkManager.Instance.naver_redirectUri_;
		if(_orientation==0){
			WemeOAuthManager.Instance.loginNaver(clientId,clientSecret,redirectUri,_WemeOauthNaverHandler);
		}else{
			WemeManager.WmOauthDisplayOrientation orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			if(_orientation==1){
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			}else{
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_LANDSCAPE;
			}
			WemeOAuthManager.Instance.loginNaver(clientId,clientSecret,redirectUri,orientation,_WemeOauthNaverHandler);
		}
	}
예제 #17
0
	public void loginYahoo(WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeOauthYahooHandler, int _orientation = 0){
		/**
		 * Yahoo auth client keys
		 */
		string clientId = WemeSdkManager.Instance.yahoo_clientId_;
		string[] scopes = {"email","openid"};
		if(_orientation==0){
			WemeOAuthManager.Instance.loginYahooJp(clientId,scopes ,_WemeOauthYahooHandler);
		}else{
			WemeManager.WmOauthDisplayOrientation orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			if(_orientation==1){
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			}else{
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_LANDSCAPE;
			}
			WemeOAuthManager.Instance.loginYahooJp(clientId,scopes,orientation ,_WemeOauthYahooHandler);
		}
	}
예제 #18
0
	/**
	 * Weme sdk showWebView
	 */
	public void showWebView(string urlString, WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_PLATFORMVIEW_VALUE_PREFIX_URI+WM_HOST_SHOWWEB);
		JSONObject paramsObject = new JSONObject();
		paramsObject.Add("url",urlString);
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #19
0
	public void requestDeviceChange(WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeOauthRequestDeviceChangeHandler){
		WemeOAuthManager.Instance.requestDeviceChange(_WemeOauthRequestDeviceChangeHandler);	
	}
예제 #20
0
	/**
	 * Weme sdk showPaymentstatementView
	 */
	public void showPaymentstatementView(WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_PLATFORMVIEW_VALUE_PREFIX_URI+WM_HOST_SHOWPAYMENTSTATEMENT);
		Debug.Log("storyzero : " + jsonObject.ToString());
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #21
0
	/*
	 * logout wemesdk 
	 * weme sdk logout both auth logout
	 */
	public void logoutWemeSdk(WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeLogoutHandler){
		WemeManager.Instance.logout(_WemeLogoutHandler);
	}
예제 #22
0
	/**
	 * Weme sdk showInviteFriendView
	 */
	public void showInviteFriendView(WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_PLATFORMVIEW_VALUE_PREFIX_URI+WM_HOST_SHOWINVITEFRIEND);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #23
0
	public void loginFacebook(string appId,string redirectUri,string[] permissions,WemeManager.WmOauthDisplayOrientation orientation,WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		if(WemeManager.isEmpty(appId)==true||WemeManager.isEmpty(redirectUri)==true){
			Debug.Log("must not null appId or redirectUri");
			return;
		}
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_VALUE_PREFIX_URI+WM_HOST_FACEBOOK);
		JSONObject paramsObject = new JSONObject();
		paramsObject.Add("appId",appId);
		paramsObject.Add("redirectUri",redirectUri);
		string permissionsString = ConvertStringArrayToString(permissions);
		paramsObject.Add("permissions",JSONArray.Parse(permissionsString));
		string orientationString = null;
		if(WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_LANDSCAPE == orientation){
			orientationString = "landscape";
		}else if(WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT == orientation){
			orientationString = "portrait";
		}
		if(orientationString!=null)
			paramsObject.Add("orientation",orientationString);
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #24
0
	/**
	 * login facebook
	 * 
	 */
	public void loginFacebook( WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeOauthFaceBookHandler, int _orientation = 0){
		
		/**
		 * facebook auth client keys
		 * 
		 * @params permissions permissions   https://developers.facebook.com/docs/reference/login/#permissions
		 */
		string appId = WemeSdkManager.Instance.facebook_appId_;
		string redirectUri = WemeSdkManager.Instance.facebook_redirectUri_;
		string[] permissions = {"read_friendlists","publish_actions","email"};
		if(_orientation==0){
			WemeOAuthManager.Instance.loginFacebook(appId,redirectUri,permissions,_WemeOauthFaceBookHandler);
		}else{
			WemeManager.WmOauthDisplayOrientation orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			if(_orientation==1){
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			}else{
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_LANDSCAPE;
			}
			WemeOAuthManager.Instance.loginFacebook(appId,redirectUri,permissions,orientation,_WemeOauthFaceBookHandler);	
		}
	}
예제 #25
0
	/**
	 * Weme sdk loginYahooConnect
	 * 
	 * @param oAuthString - 
	 * @param WmInterfaceBrokerDelegate
	 */
	public void loginYahooJp(string clientId,string[] scopes,WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		if(WemeManager.isEmpty(clientId)==true){
			Debug.Log("must not null clientId or clientSecret");
			return;
		}
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_VALUE_PREFIX_URI+WM_HOST_YAHOOJP);
		JSONObject paramsObject = new JSONObject();
		paramsObject.Add("clientId",clientId);
		string scopesString = ConvertStringArrayToString(scopes);
		paramsObject.Add("scopes",JSONArray.Parse(scopesString));
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #26
0
	/*
	public void getFacebookFriends(){
		FacebookReqeustURL facebookSender = getFacebookSender();
		Dictionary<string,string> requestParams = new Dictionary<string, string>();
		requestParams.Add("access_token",JSONObject.Parse(resultString).GetObject("authData").GetString("accessToken"));
		facebookSender.getFriends(requestParams);			
	}
	
	public void getFacebookMe(){
		FacebookReqeustURL facebookSender = getFacebookSender();
		Dictionary<string,string> requestParams = new Dictionary<string, string>();
		requestParams.Add("access_token",JSONObject.Parse(resultString).GetObject("authData").GetString("accessToken"));
		facebookSender.getMe(requestParams);
	}
	
	public void getFacebookMeFeed(){
		FacebookReqeustURL facebookSender = getFacebookSender();
		Dictionary<string,string> requestParams = new Dictionary<string, string>();
		requestParams.Add("access_token",JSONObject.Parse(resultString).GetObject("authData").GetString("accessToken"));
		facebookSender.getMeFeed(requestParams);
	}
	
	FacebookReqeustURL getFacebookSender(){
		if(nowStateObject.GetComponent<FacebookReqeustURL>()!=null){
			return nowStateObject.GetComponent<FacebookReqeustURL>();
		}
		return  nowStateObject.AddComponent<FacebookReqeustURL>();
	}
	*/
	/**
	 *  login twitter
	 */
	public void loginTwitter(WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeOauthTwitterHandler, int _orientation = 0){
		
		/**
		 * 
		 *  twitter auth client keys
		 */
		string consumerKey = WemeSdkManager.Instance.twitter_consumerKey_;
		string consumerSecret = WemeSdkManager.Instance.twitter_consumerSecret_;
		string callbackUrl = WemeSdkManager.Instance.twitter_callbackUrl_;
		if(_orientation==0){
			WemeOAuthManager.Instance.loginTwitter(consumerKey,consumerSecret,callbackUrl,_WemeOauthTwitterHandler);
		}else{
			WemeManager.WmOauthDisplayOrientation orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			if(_orientation==1){
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			}else{
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_LANDSCAPE;
			}
			WemeOAuthManager.Instance.loginTwitter(consumerKey,consumerSecret,callbackUrl,orientation,_WemeOauthTwitterHandler);
		}
		
		
	}
예제 #27
0
	/**
	 * login weme 
	 */
	public void loginWeme(WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeOauthWemeHandler, int _orientation = 0){
		
		/**
		 * weme auth client keys
		 */
		string clientId = WemeSdkManager.Instance.weme_clientId_;
		string clientSecret = WemeSdkManager.Instance.weme_clientSecret_;
		if(_orientation==0){
			WemeOAuthManager.Instance.loginWeme(clientId,clientSecret,_WemeOauthWemeHandler);
		}else{
			WemeManager.WmOauthDisplayOrientation orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			if(_orientation==1){
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			}else{
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_LANDSCAPE;
			}
			WemeOAuthManager.Instance.loginWeme(clientId,clientSecret,orientation,_WemeOauthWemeHandler);
		}
		
		
	}
예제 #28
0
	/**
	 * login Google 
	 */
	public void loginGoogle(WmInterfaceBroker.WmInterfaceBrokerDelegate _WemeOauthGoogleHandler, int _orientation = 0){
		
		/**
		 * google auth client keys
		 */
		string clientId = WemeSdkManager.Instance.google_clientId_;
		string clientSecret = WemeSdkManager.Instance.google_clientSecret_;
		string[] scopes = {"email","profile"};
		
		if(_orientation==0){
			WemeOAuthManager.Instance.loginGoogle(clientId,clientSecret,scopes,_WemeOauthGoogleHandler);
		}else{
			WemeManager.WmOauthDisplayOrientation orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			if(_orientation==1){
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_PORTRAIT;
			}else{
				orientation = WemeManager.WmOauthDisplayOrientation.WM_OAUTH_DISPLAY_ORIENTATION_LANDSCAPE;
			}
			WemeOAuthManager.Instance.loginGoogle(clientId,clientSecret,scopes,orientation,_WemeOauthGoogleHandler);
		}
		
		
	}
예제 #29
0
	/**
	 * Weme sdk loginFacebook
	 * 
	 * @param oAuthString - 
	 * @param WmInterfaceBrokerDelegate
	 */
	public void loginFacebook(string appId,string redirectUri,string[] permissions,WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		if(WemeManager.isEmpty(appId)==true||WemeManager.isEmpty(redirectUri)==true){
			Debug.Log("must not null appId or redirectUri");
			return;
		}
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_VALUE_PREFIX_URI+WM_HOST_FACEBOOK);
		JSONObject paramsObject = new JSONObject();
		paramsObject.Add("appId",appId);
		paramsObject.Add("redirectUri",redirectUri);
		string permissionsString = ConvertStringArrayToString(permissions);
		paramsObject.Add("permissions",JSONArray.Parse(permissionsString));
		jsonObject.Add(JSON_KEY_PARAMS,paramsObject);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}
예제 #30
0
	public void refreshPromotion(WmInterfaceBroker.WmInterfaceBrokerDelegate callback){
		JSONObject jsonObject = new JSONObject();
		jsonObject.Add(JSON_KEY_URI,JSON_VALUE_PREFIX_URI+WM_HOST_REFRESHPROMOTION);
		WmInterfaceBroker.getInstance.requestAsync(jsonObject.ToString(),callback);
	}