本文整理汇总了Java中com.weibo.sdk.android.WeiboDialogError类的典型用法代码示例。如果您正苦于以下问题:Java WeiboDialogError类的具体用法?Java WeiboDialogError怎么用?Java WeiboDialogError使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
WeiboDialogError类属于com.weibo.sdk.android包,在下文中一共展示了WeiboDialogError类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onError
import com.weibo.sdk.android.WeiboDialogError; //导入依赖的package包/类
@Override
public void onError(WeiboDialogError e) {
//MyToast.showToast(context, context.getResources().getString(R.string.sina_oauth_fail),0);
if(sinaCallBack != null){
sinaCallBack.authorizeFail();
}
}
示例2: auth
import com.weibo.sdk.android.WeiboDialogError; //导入依赖的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;
}
示例3: onError
import com.weibo.sdk.android.WeiboDialogError; //导入依赖的package包/类
@Override
public void onError(WeiboDialogError e) {
Toast.makeText(getApplicationContext(),
"Auth error : " + e.getMessage(), Toast.LENGTH_LONG).show();
}
示例4: onError
import com.weibo.sdk.android.WeiboDialogError; //导入依赖的package包/类
@Override
public void onError(WeiboDialogError e) {
Toast.makeText(getApplicationContext(),
"Auth error : " + e.getMessage(), Toast.LENGTH_LONG).show();
}
示例5: onError
import com.weibo.sdk.android.WeiboDialogError; //导入依赖的package包/类
@Override
public void onError(WeiboDialogError e) {
SmartToast.showShortToast(getApplicationContext(),
getString(R.string.hint_weibo_auth_error) + e.getMessage(),
true);
}
示例6: onError
import com.weibo.sdk.android.WeiboDialogError; //导入依赖的package包/类
@Override
public void onError(WeiboDialogError arg0) {
Toast.makeText(getApplicationContext(),
"Auth error : " + arg0.getMessage(), Toast.LENGTH_LONG)
.show();
}