本文整理汇总了Java中com.weibo.sdk.android.WeiboException类的典型用法代码示例。如果您正苦于以下问题:Java WeiboException类的具体用法?Java WeiboException怎么用?Java WeiboException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WeiboException类属于com.weibo.sdk.android包,在下文中一共展示了WeiboException类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: auth
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
/**
* @param activity
* @param handler
* @return
*/
public SsoHandler auth(final Activity activity, final ReqHandler handler) {
SsoHandler ssoHandler = new SsoHandler(activity, weibo);
ssoHandler.authorize(new WeiboAuthListener() {
@Override
public void onComplete(Bundle data) {
AccessTokenKeeper.clear(activity);
Oauth2AccessToken token = new Oauth2AccessToken(data.getString("access_token"),
data.getString("expires_in"));
AccessTokenKeeper.keepAccessToken(activity, token);
handler.onSucceed();
}
@Override
public void onCancel() {
handler.onFail(activity.getString(R.string.weibo_auth_cancel));
}
@Override
public void onError(WeiboDialogError error) {
handler.onFail(error.getMessage());
}
@Override
public void onWeiboException(WeiboException exception) {
handler.onFail(exception.getMessage());
}
});
return ssoHandler;
}
开发者ID:RincLiu,项目名称:Roid-Library,代码行数:35,代码来源:RLWeiboHelper.java
示例2: onError
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onError(WeiboException e) {
try {
super.onError(e);
} finally {
sendBroadCast(mBaseActivity, BROADCAST_ACTION_NEW_WEIBO_FAILD, mTempStatus); //发出广播
}
}
开发者ID:alexcaisenchuan,项目名称:FunWeibo,代码行数:9,代码来源:WeiboUtils.java
示例3: onError
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onError(WeiboException e) {
KLog.w(TAG, "onError", e);
String msg = e.getMessage();
Throwable cause = e.getCause();
WeiboError error = null;
try {
error = new WeiboError(msg);
} catch (JSONException e1) {
KLog.w(TAG, "JSONException while build WeiboError", e1);
}
String str = "";
if(error != null) {
switch(error.error_code) {
case WeiboError.ERROR_WEIBO_NOT_EXIST:
str = mBaseActivity.getString(R.string.weibo_error_not_exist);
break;
case WeiboError.ERROR_REQUEST_FREQ_BEYOND_LIMIT:
str = mBaseActivity.getString(R.string.weibo_error_request_freq_beyond_limit);
break;
default:
str = mBaseActivity.getString(R.string.hint_error) + e.toString();
break;
}
} else {
if(cause instanceof IOException) {
str = mBaseActivity.getString(R.string.hint_check_network);
} else {
str = mBaseActivity.getString(R.string.hint_error) + e.toString();
}
}
mBaseActivity.showToastOnUIThread(str);
}
开发者ID:alexcaisenchuan,项目名称:FunWeibo,代码行数:39,代码来源:OnHttpRequestReturnListener.java
示例4: onWeiboException
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onWeiboException(WeiboException e) {
Toast.makeText(getApplicationContext(),
"Auth exception : " + e.getMessage(), Toast.LENGTH_LONG)
.show();
}
开发者ID:steven2947,项目名称:NeXT_pyp,代码行数:7,代码来源:TimelineActivity.java
示例5: onError
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onError(WeiboException arg0) {
Toast.makeText(SinaShareActivity.this, "����ʧ��", 3000).show();
closeProgressDialog();
}
开发者ID:phoenixNirvana,项目名称:NewCommunication-Android,代码行数:6,代码来源:SinaShareActivity.java
示例6: onError
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onError(WeiboException arg0) {
if(sinaCallBack != null){
sinaCallBack.authorizeFail();
}
}
开发者ID:phoenixNirvana,项目名称:NewCommunication-Android,代码行数:7,代码来源:SinaWeiboHelper.java
示例7: onWeiboException
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onWeiboException(WeiboException e) {
//MyToast.showToast(context, context.getResources().getString(R.string.sina_oauth_fail),0);
if(sinaCallBack != null)
sinaCallBack.authorizeFail();
}
开发者ID:phoenixNirvana,项目名称:NewCommunication-Android,代码行数:7,代码来源:SinaWeiboHelper.java
示例8: onWeiboException
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onWeiboException(WeiboException e) {
Toast.makeText(getApplicationContext(),
"Auth exception : " + e.getMessage(), Toast.LENGTH_LONG)
.show();
}
开发者ID:easywu,项目名称:NameFate,代码行数:7,代码来源:ResultView.java
示例9: onWeiboException
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onWeiboException(WeiboException e) {
SmartToast.showShortToast(getApplicationContext(),
getString(R.string.hint_weibo_auth_exception) + e.getMessage(),
true);
}
开发者ID:alexcaisenchuan,项目名称:FunWeibo,代码行数:7,代码来源:ActivityLogin.java
示例10: onError
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onError(WeiboException arg0) {
//...
}
开发者ID:alexcaisenchuan,项目名称:FunWeibo,代码行数:5,代码来源:AppControl.java
示例11: onError
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onError(WeiboException e) {
super.onError(e);
//分享原网址
ShareUtils.share(BaiduMapActivity.this, shareTitle, shareText, null);
}
开发者ID:alexcaisenchuan,项目名称:FunWeibo,代码行数:7,代码来源:BaiduMapActivity.java
示例12: onWeiboException
import com.weibo.sdk.android.WeiboException; //导入依赖的package包/类
@Override
public void onWeiboException(WeiboException arg0) {
Toast.makeText(getApplicationContext(),
"Auth exception : " + arg0.getMessage(), Toast.LENGTH_LONG)
.show();
}
开发者ID:Water-bamboo,项目名称:seexian,代码行数:7,代码来源:MainActivity.java
注:本文中的com.weibo.sdk.android.WeiboException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论