新浪微博Android SDK为开发者提供了Oauth2.0授权认证,并集成SSO登录功能,
2.3 登录/注销按钮
微博SDK目前提供了两类登录按钮:一种是一键登陆按钮,一种是登陆/注销按钮,两者都是调用SSO登录接口。
1: 有用的网址:
weibo 开发者平台: http://open.weibo.com/
SDK 下载地址和文档 https://github.com/kodulf/weibo_android_sdk
填写应用的详细内容 http://open.weibo.com/apps/835613722/info/basic
主要的参考文档: https://github.com/kodulf/weibo_android_sdk/blob/master/%E5%BE%AE%E5%8D%9AAndroid%E5%B9%B3%E5%8F%B0SDK%E6%96%87%E6%A1%A3V3.1.2.docx
移动过客户端接入: http://open.weibo.com/wiki/%E7%A7%BB%E5%8A%A8%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%8E%A5%E5%85%A5
2:先从https://github.com/kodulf/weibo_android_sdk这里把工程下载下来
3:然后将weiboSDK导入进来,
第一步:在工程app/libs目录下放入weiboSDKCore_3.1.2.jar包,
在src/main/目录下新建jniLibs目录,放入weibo_android_sdk-master\demo-src\WeiboSDKDemo\libs目录下的所有的包含了so文件的目录
第二步:导入jar包。菜单栏选择File->Project Structor->Modules->Dependencies,点击+号,选择File dependency,选择jar包导入。
4:签名要注意
Build->Generate Signed Apk->Create
生成在工程目录下面,放在app下面,
起一个名字weibo,
确定密码
android
要求一点运行,就使用这个签名报
点击F4,app->Signing
KeyAlias->android
KeyPassword->android
Store File->写相对路劲,因为放在app下面的。所以直接qswiki.jks
Store Password->android
BuildTypes-》debug、release 都选择刚才的配置作为签名配置。
5:安装https://github.com/sinaweibosdk/weibo_android_sdk
然后在安装我们的项目,
输入Android包名 com.gp7.gp.hellogp7
这样就得到签名了:Android签名:83b9e385d67d6aebc206605b38443119,
6:修改weibo 上面应用的参数,输入上面的包名和签名以及应用地址:http://47.88.30.198/
7:在清单文件添加
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
8:参考Demo里面的内容,
先写Contants
然后写AccessTokenKeeper,在这里,可以用来存储AccessToken,获取AccessToken
再然后写WBAuthActivity,
------------------------------------------
清单文件:
<activity
android:name="com.sina.weibo.sdk.component.WeiboSdkBrowser"
android:configChanges="keyboardHidden|orientation"
android:windowSoftInputMode="adjustResize"
android:exported="false" >
</activity>
<activity android:name=".WBAuthActivity"></activity>
------------------------------------------
public interface Constants {
public static final String APP_KEY = "835613722";
// 应用的APP_KEY
public static final String REDIRECT_URL = "https://api.weibo.com/oauth2/default.html";// 应用的回调页
public static final String SCOPE =
// 应用申请的高级权限
"email,direct_messages_read,direct_messages_write,"
+ "friendships_groups_read,friendships_groups_write,statuses_to_me_read,"
+ "follow_app_official_microblog," + "invitation_write";
}
------------------------------------------
AccessTokenKeeper:
public class AccessTokenKeeper {
private static final String PREFERENCES_NAME = "com_weibo_sdk_android";
private static final String KEY_UID = "uid";
private static final String KEY_ACCESS_TOKEN = "access_token";
private static final String KEY_EXPIRES_IN = "expires_in";
private static final String KEY_REFRESH_TOKEN = "refresh_token";
/**
* 保存 Token 对象到 SharedPreferences。
*
* @param context 应用程序上下文环境
* @param token Token 对象
*/
public static void writeAccessToken(Context context, Oauth2AccessToken token) {
if (null == context || null == token) {
return;
}
SharedPreferences pref = context.getSharedPreferences(PREFERENCES_NAME, Context.MODE_APPEND);
SharedPreferences.Editor editor = pref.edit();
editor.putString(KEY_UID, token.getUid());
editor.putString(KEY_ACCESS_TOKEN, token.getToken());
editor.putString(KEY_REFRESH_TOKEN, token.getRefreshToken());
editor.putLong(KEY_EXPIRES_IN, token.getExpiresTime());
editor.commit();
}
/**
* 从 SharedPreferences 读取 Token 信息。
*
* @param context 应用程序上下文环境
*
* @return 返回 Token 对象
*/
public static Oauth2AccessToken readAccessToken(Context context) {
if (null == context) {
return null;
}
Oauth2AccessToken token = new Oauth2AccessToken();
SharedPreferences pref = context.getSharedPreferences(PREFERENCES_NAME, Context.MODE_APPEND);
token.setUid(pref.getString(KEY_UID, ""));
token.setToken(pref.getString(KEY_ACCESS_TOKEN, ""));
token.setRefreshToken(pref.getString(KEY_REFRESH_TOKEN, ""));
token.setExpiresTime(pref.getLong(KEY_EXPIRES_IN, 0));
return token;
}
/**
* 清空 SharedPreferences 中 Token信息。
*
* @param context 应用程序上下文环境
*/
public static void clear(Context context) {
if (null == context) {
return;
}
SharedPreferences pref = context.getSharedPreferences(PREFERENCES_NAME, Context.MODE_APPEND);
SharedPreferences.Editor editor = pref.edit();
editor.clear();
editor.commit();
}
}
--------------------------------------------------
package com.gp7.gp.hellogp7;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.PersistableBundle;
import android.text.TextUtils;
import android.text.method.ScrollingMovementMethod;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;
import com.sina.weibo.sdk.auth.AuthInfo;
import com.sina.weibo.sdk.auth.Oauth2AccessToken;
import com.sina.weibo.sdk.auth.WeiboAuthListener;
import com.sina.weibo.sdk.auth.sso.SsoHandler;
import com.sina.weibo.sdk.exception.WeiboException;
import org.w3c.dom.Text;
import java.text.SimpleDateFormat;
/**
* Created by XUE on 2016/1/18.
*/
public class WBAuthActivity extends Activity {
private static final String TAG = "weibosdk";
/** 显示认证后的信息,如 AccessToken */
private TextView mTokenText;
private AuthInfo mAuthInfo;
/** 封装了 "access_token","expires_in","refresh_token",并提供了他们的管理功能 */
private Oauth2AccessToken mAccessToken;
/** 注意:SsoHandler 仅当 SDK 支持 SSO 时有效 */
private SsoHandler mSsoHandler;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_auth);
// 获取 Token View,并让提示 View 的内容可滚动(小屏幕可能显示不全)
mTokenText = (TextView) findViewById(R.id.token_text_view);
TextView hintView = (TextView) findViewById(R.id.obtain_token_hint);
hintView.setMovementMethod(new ScrollingMovementMethod());
// 创建微博实例
//mWeiboAuth = new WeiboAuth(this, Constants.APP_KEY, Constants.REDIRECT_URL, Constants.SCOPE);
// 快速授权时,请不要传入 SCOPE,否则可能会授权不成功
mAuthInfo = new AuthInfo(this, Constants.APP_KEY, Constants.REDIRECT_URL, Constants.SCOPE);
mSsoHandler = new SsoHandler(WBAuthActivity.this, mAuthInfo);
findViewById(R.id.obtain_token_via_sso).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mSsoHandler.authorizeClientSso(new AuthListener());
}
});
// 手机短信授权
// title 短信注册页面title,可选,不传时默认为""验证码登录""。此处WeiboAuthListener 对象 listener
//可以是和sso 同一个 listener 回调对象 也可以是不同的。开发者根据需要选择
findViewById(R.id.obtain_token_via_mobile).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mSsoHandler.registerOrLoginByMobile("验证码登录",new AuthListener());
}
});
// SSO 授权, 仅Web
findViewById(R.id.obtain_token_via_web).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mSsoHandler.authorizeWeb(new AuthListener());
}
});
// SSO 授权, ALL IN ONE 如果手机安装了微博客户端则使用客户端授权,没有则进行网页授权
findViewById(R.id.obtain_token_via_signature).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mSsoHandler.authorize(new AuthListener());
}
});
// 用户登出
findViewById(R.id.logout).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
AccessTokenKeeper.clear(getApplicationContext());
mAccessToken = new Oauth2AccessToken();
updateTokenView(false);
}
});
// 从 SharedPreferences 中读取上次已保存好 AccessToken 等信息,
// 第一次启动本应用,AccessToken 不可用
mAccessToken = AccessTokenKeeper.readAccessToken(this);
if (mAccessToken.isSessionValid()) {
updateTokenView(true);
}
}
class AuthListener implements WeiboAuthListener {
@Override
public void onComplete(Bundle values) {
// 从 Bundle 中解析 Token
mAccessToken = Oauth2AccessToken.parseAccessToken(values);
//从这里获取用户输入的 电话号码信息
String phoneNum = mAccessToken.getPhoneNum();
if (mAccessToken.isSessionValid()) {
// 显示 Token
updateTokenView(false);
// 保存 Token 到 SharedPreferences
AccessTokenKeeper.writeAccessToken(WBAuthActivity.this, mAccessToken);
Toast.makeText(WBAuthActivity.this,
R.string.weibosdk_demo_toast_auth_success, Toast.LENGTH_SHORT).show();
} else {
// 以下几种情况,您会收到 Code:
// 1. 当您未在平台上注册的应用程序的包名与签名时;
// 2. 当您注册的应用程序包名与签名不正确时;
// 3. 当您在平台上注册的包名和签名与您当前测试的应用的包名和签名不匹配时。
String code = values.getString("code");
String message = getString(R.string.weibosdk_demo_toast_auth_failed);
if (!TextUtils.isEmpty(code)) {
message = message + "\nObtained the code: " + code;
}
Toast.makeText(WBAuthActivity.this, message, Toast.LENGTH_LONG).show();
}
}
@Override
public void onCancel() {
Toast.makeText(WBAuthActivity.this,
R.string.weibosdk_demo_toast_auth_canceled, Toast.LENGTH_LONG).show();
}
@Override
public void onWeiboException(WeiboException e) {
Toast.makeText(WBAuthActivity.this,
"Auth exception : " + e.getMessage(), Toast.LENGTH_LONG).show();
}
}
/**
* 显示当前 Token 信息。
*
* @param hasExisted 配置文件中是否已存在 token 信息并且合法
*/
private void updateTokenView(boolean hasExisted) {
String date = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").format(
new java.util.Date(mAccessToken.getExpiresTime()));
String format = getString(R.string.weibosdk_demo_token_to_string_format_1);
mTokenText.setText(String.format(format, mAccessToken.getToken(), date));
String message = String.format(format, mAccessToken.getToken(), date);
if (hasExisted) {
message = getString(R.string.weibosdk_demo_token_has_existed) + "\n" + message;
}
mTokenText.setText(message);
}
}
-----------------------------------------------------------
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
tools:context=".WBAuthActivity" >
<Button
android:id="@+id/obtain_token_via_sso"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:text="@string/weibosdk_demo_obtain_token_via_sso" />
<Button
android:id="@+id/obtain_token_via_web"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="left|center_vertical"
android:text="@string/weibosdk_demo_obtain_token_via_web" />
<Button
android:id="@+id/obtain_token_via_signature"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="left|center_vertical"
android:text="@string/weibosdk_demo_obtain_token_via_sso_all_in_one" />
<Button
android:id="@+id/logout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="left|center_vertical"
android:text="@string/weibosdk_demo_obtain_token_logout" />
<Button
android:id="@+id/obtain_token_via_code"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:gravity="left|center_vertical"
android:visibility="gone"
android:text="@string/weibosdk_demo_obtain_token_via_code" />
<Button
android:id="@+id/obtain_token_via_mobile"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="left|center_vertical"
android:layout_marginTop="10dip"
android:text="@string/weibosdk_demo_obtain_token_via_mobile" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:textSize="16sp"
android:textStyle="bold"
android:text="@string/weibosdk_demo_token_info" />
<TextView
android:id="@+id/token_text_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textSize="12sp" />
<TextView
android:id="@+id/obtain_token_hint"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginBottom="10dp"
android:textSize="12sp"
android:scrollbars="vertical"
android:maxLines="1000"
android:text="@string/weibosdk_demo_obtain_token_hint" />
<ImageView
android:id="@+id/user_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_logo" />
</LinearLayout>
-----------------------------------------------
<resources>
<string name="app_name">HelloGP7</string>
<!-- 功能列表 -->
<string name="weibosdk_demo_feature_oauth">微博授权</string>
<string name="weibosdk_demo_feature_share">分享到微博</string>
<string name="weibosdk_demo_feature_pay">微博支付</string>
<string name="weibosdk_demo_social_component">社会化组件</string>
<string name="weibosdk_demo_feature_login_logout">登录注销按钮</string>
<string name="weibosdk_demo_feature_nick_name_login">昵称登录</string>
<string name="weibosdk_demo_feature_open_api">开放接口(Open API)</string>
<string name="weibosdk_demo_feature_open_device_id">获取设备 ID</string>
<string name="weibosdk_demo_feature_scheme_page">scheme 调用微博指定页面</string>
<string name="weibosdk_demo_feature_game_page">游戏接口 </string>
<!-- 获取 Token -->
<string name="weibosdk_demo_obtain_token_via_sso_all_in_one">SSO 授权(ALL IN ONE)</string>
<string name="weibosdk_demo_obtain_token_via_web">SSO 授权(Web)</string>
<string name="weibosdk_demo_obtain_token_via_sso">SSO 授权(仅客户端)</string>
<string name="weibosdk_demo_obtain_token_via_mobile">手机短信注册登录</string>
<string name="weibosdk_demo_obtain_token_via_signature">Web 授权</string>
<string name="weibosdk_demo_obtain_token_via_quick_sso">通过微博客户端快速授权</string>
<string name="weibosdk_demo_obtain_token_via_code">通过 Code 获取 Token</string>
<string name="weibosdk_demo_obtain_token_logout">用户登出</string>
<string name="weibosdk_demo_token_info">Token 信息:</string>
<string name="weibosdk_demo_token_has_existed">Token 仍在有效期内,无需再次登录。</string>
<string name="weibosdk_demo_obtain_token_hint"><b>请注意:</b>\n<li>SSO 登录需要微博客户端的支持,目前仅 3.0.0 及以上微博客户端版本支持 SSO;如果未安装,将自动转为 Oauth2.0 Web 授权认证(即第一种认证方式)</li>\n<li>如果您通过方式一和方式二获取不到 Token,而是获取到 code,那说明您的包名和签名存在问题,请到开放平台注册包名和签名。详情请查看 FAQ 文档</li></string>
<string name="weibosdk_demo_obtain_token_via_sso_hint">使用 SSO 登录前,请检查手机上是否已经安装新浪微博客户端,目前仅 3.0.0 及以上微博客户端版本支持 SSO;如果未安装,将自动转为 Oauth2.0 进行认证。</string>
<string name="weibosdk_demo_obtain_token_via_code_hint"><b>请注意:</b>基于以下几点原因,您可能不想使用前面的两种授权方式:\n<li>出于安全性的考虑,您不信任目前使用应用的包名和签名来获取 Token 的方式</li>\n<li>您不想安装微博客户端</li>\n您可以自行通过 Code 来获取 Token。通过这种方式需要使用到 APP_SECRET,请务必妥善保管好自己的 APP_SECRET,<b>不要直接暴露在程序中,泄露有风险</b>。\n<b>更多细节请查看:</b><a href="http://open.weibo.com/wiki/%E6%8E%88%E6%9D%83%E6%9C%BA%E5%88%B6%E8%AF%B4%E6%98%8E#Web.E5.BA.94.E7.94.A8.E7.9A.84.E9.AA.8C.E8.AF.81.E6.8E.88.E6.9D.83">验证授权步骤</a></string>
<string name="weibosdk_demo_step_to_obtain_code">第一步:获取 Code</string>
<string name="weibosdk_demo_step_to_obtain_token">第二步:通过 Code 获取 Token</string>
<string name="weibosdk_demo_code_text_hint">第一步获取到的 Code:(一次性有效)</string>
<string name="weibosdk_demo_token_text_hint">第二步获取到的 Token:</string>
<string name="weibosdk_demo_token_to_string_format">Token:%1$s \nRefresh Token:%2$s \nexpires_in:%3$s</string>
<string name="weibosdk_demo_token_to_string_format_1">Token:%1$s \n有效期:%2$s</string>
<string name="weibosdk_demo_toast_auth_success">授权成功</string>
<string name="weibosdk_demo_toast_auth_failed">授权失败</string>
<string name="weibosdk_demo_toast_auth_canceled">取消授权</string>
<string name="weibosdk_demo_toast_obtain_code_success">获取 Code 成功</string>
<string name="weibosdk_demo_toast_obtain_code_failed">获取 Code 失败</string>
<string name="weibosdk_demo_toast_obtain_token_success">获取 Token 成功</string>
<string name="weibosdk_demo_toast_obtain_token_failed">获取 Token 失败</string>
<string name="weibosdk_demo_game_achievement_add">后台游戏成就对象入库</string>
<string name="weibosdk_demo_game_achievement_update">后台游戏成就对象更新</string>
<string name="weibosdk_demo_game_relation_add">用户获得游戏成就关系入库</string>
<string name="weibosdk_demo_game_relation_update">用户获得游戏成就关系更新</string>
<string name="weibosdk_demo_game_score_add">得分关系入库</string>
<string name="weibosdk_demo_game_read_player_score">读取玩家游戏分数</string>
<string name="weibosdk_demo_game_read_player_friend_score">读取玩家好友的游戏分数 </string>
<string name="weibosdk_demo_game_read_achievement_user_gain">读取玩家在某个游戏下的成就 </string>
<string name="weibosdk_demo_game_invatation_friend_list">邀请好友列表 </string>
<string name="weibosdk_demo_game_invatation_one_friend">邀请好友 单个h5页面 </string>
<string name="weibosdk_demo_game_result_msg">接口请求结果 </string>
<!-- 分享微博入口界面 -->
<string name="weibosdk_demo_is_support_sdk">当前微博客户端是否支持 SDK</string>
<string name="weibosdk_demo_register_app_to_weibo">注册应用到微博</string>
<string name="weibosdk_demo_share_to_weibo">分享到微博(仅客户端)</string>
<string name="weibosdk_demo_share_to_weibo_all_in_one">分享到微博(ALL IN ONE)</string>
<string name="weibosdk_demo_register_app_to_weibo_hint"><li>如何查看是否注册成功?打开微博客户端->点击发搏器->点击右下角的+号->点击添加应用,看看能否看到该 DEMO 应用。</li>\n<li>当您的应用成功的注册到微博后,您可以通过从微博客户端唤起您的应用,实现分享(即微博附件栏集成分享)。</li>\n<li>该附件栏集成分享权限需要合作申请。<b>详情请见:</b><a href="http://open.weibo.com/wiki/%E7%A7%BB%E5%8A%A8%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%8E%A5%E5%85%A5">2、微博原生分享 --> b) 集成分享</a></li>\n<b>请注意:</b>目前该 DEMO 应用已申请过权限,默认情况下,第三方应用没有对应权限。</string>
<string name="weibosdk_demo_obtain_client_abstract_info_hint">当前微博客户端信息如下:</string>
<string name="weibosdk_demo_is_installed_weibo">1. 是否安装了微博客户端?</string>
<string name="weibosdk_demo_support_api_level">2. 当前微博客户端支持的 SDK 版本号:</string>
<string name="weibosdk_demo_support_api_level_hint"><b>请注意:</b>\n<li>目前第三方分享微博需要客户端的支持,请确保已安装微博客户端。如果不想使用微博客户端进行分享,请参照:<a href="http://open.weibo.com/wiki/2/statuses/upload">OpenAPI</a></li>\n<li>SupportApi >= 10351时,微博客户端支持同时分享多条数据,即同时可以分享文本、图片以及其它媒体资源(网页、音乐、视频、声音)中的一种;</li>\n<li>SupportApi < 10351,微博客户端只支持分享单条数据,即只能分享文本、图片、网页、音乐、视频中的一种,不支持声音(Voice)消息;</li>\n<li>SupportApi = -1,微博客户端不支持 SDK 分享或微博客户端未安装或微博客户端是非官方版本。</li></string>
<string name="weibosdk_demo_not_support_api_hint">微博客户端不支持 SDK 分享或微博客户端未安装或微博客户端是非官方版本。</string>
<string name="weibosdk_demo_has_installed_weibo">\t已安装</string>
<string name="weibosdk_demo_has_not_installed_weibo">\t未安装</string>
<string name="weibosdk_demo_cancel_download_weibo">\t取消下载</string>
<string name="weibosdk_demo_toast_register_app_to_weibo">已注册,请打开微博客户端查看是否注册成功。</string>
<!-- 分享微博主界面 -->
<string name="weibosdk_demo_share_to_weibo_title">从本应用->微博->本应用</string>
<string name="weibosdk_demo_share_to_weibo_title_all_in_one">分享微博ALL IN ONE</string>
<string name="weibosdk_demo_share_from_weibo_title">从微博->本应用->微博</string>
<string name="weibosdk_demo_share_default_text">欢迎使用新浪微博 SDK</string>
<string name="weibosdk_demo_share_to">分 享</string>
<string name="weibosdk_demo_share_text_title">分享文字</string>
<string name="weibosdk_demo_share_image_title">分享图片</string>
<string name="weibosdk_demo_share_webpage_title">分享网页</string>
<string name="weibosdk_demo_share_music_title">分享音乐</string>
<string name="weibosdk_demo_share_video_title">分享视频</string>
<string name="weibosdk_demo_share_voice_title">分享声音</string>
<!-- 分享所用的测试数据 -->
<string name="weibosdk_demo_share_webpage_desc">网页描述:XXX</string>
<string name="weibosdk_demo_share_music_desc">音乐描述:XXX</string>
<string name="weibosdk_demo_share_video_desc">视频描述:XXX</string>
<string name="weibosdk_demo_share_voice_desc">声音描述:XXX</string>
<string name="weibosdk_demo_app_url">https://github.com/mobileresearch/weibo_android_sdk/blob/master/WeiboSDKDemo.apk</string>
<string name="weibosdk_demo_test_webpage_url">http://news.sina.com.cn/c/2013-10-22/021928494669.shtml</string>
<string name="weibosdk_demo_test_music_url">http://music.sina.com.cn/yueku/i/2850305.html</string>
<string name="weibosdk_demo_test_video_url">http://video.sina.com.cn/p/sports/cba/v/2013-10-22/144463050817.html</string>
<!-- NOTE: Voice 的 URL 与 Music 一样 -->
<string name="weibosdk_demo_test_voice_url">http://music.sina.com.cn/yueku/i/2850305.html</string>
<!-- 分享示例模板 -->
<string name="weibosdk_demo_share_text_template">我正在使用微博客户端发博器分享文字</string>
<string name="weibosdk_demo_share_webpage_template">【%1$s】(分享自 WeiboSDKDemo %2$s)</string>
<string name="weibosdk_demo_share_music_template">我正在听 %1$s(分享自 WeiboSDKDemo %2$s)</string>
<string name="weibosdk_demo_share_video_template">我正在看 %1$s(分享自 WeiboSDKDemo %2$s)</string>
<string name="weibosdk_demo_share_voice_template">我分享了 %1$s(分享自 WeiboSDKDemo %2$s)</string>
<string name="weibosdk_demo_share_webpage_demo">XXX 新闻</string>
<string name="weibosdk_demo_share_music_demo">XXX 音乐</string>
<string name="weibosdk_demo_share_video_demo">XXX 视频</string>
<string name="weibosdk_demo_share_voice_demo">XXX 声音</string>
<!-- 分享成功失败的 Toast -->
<string name="weibosdk_demo_toast_share_success">分享成功</string>
<string name="weibosdk_demo_toast_share_failed">分享失败</string>
<string name="weibosdk_demo_toast_share_canceled">取消分享</string>
<string name="weibosdk_demo_toast_share_response_args_success">收到微博发起的请求成功</string>
<string name="weibosdk_demo_toast_share_response_args_failed">收到客户端请求消息失败</string>
<!-- 微博支付 -->
<string name="weibosdk_demo_weibo_pay_get_order_uri">http://180.149.139.199:8081/v2/pay/paydemo</string>
<string name="weibosdk_demo_weibo_pay_get_order">获取订单</string>
<string name="weibosdk_demo_weibo_pay">微博支付</string>
<string name="weibosdk_demo_support_weibo_pay"> 当前微博客户端是否支持支付?</string>
<!-- 登录/注销按钮 -->
<string name="weibosdk_demo_login_hint"><b>一键登录按钮:</b>\n(有以下三种样式,第一种为默认效果)</string>
<string name="weibosdk_demo_login_with_text_hint"><b>登录/注销按钮:</b>\n(有以下两种样式,第一种为默认效果,可修改)</string>
<string name="weibosdk_demo_logout_hint"><b>注销按钮:</b>\n(注意:该按钮不再进行封装,第三方可直接调用 LogoutAPI,<b>一个 token 不能重复注销多次</b>)</string>
<string name="weibosdk_demo_logout">注销</string>
<string name="weibosdk_demo_logout_success">已注销</string>
<string name="weibosdk_demo_logout_failed">注销失败</string>
<string name="weibosdk_demo_logout_failed_1">注销失败,请检查 Token 是否正确(一个 token 不能重复注销多次)</string>
<!-- OpenAPI -->
<string name="weibosdk_demo_openapi_revoke_auth_success">授权回收成功</string>
<string name="weibosdk_demo_openapi_revoke_auth_failed">授权回收失败</string>
<string name="weibosdk_demo_openapi_invite_uid_hint">请输入被邀请人的uid</string>
<string name="weibosdk_demo_openapi_invite">邀请</string>
<string name="weibosdk_demo_openapi_invite_success">发送邀请成功</string>
<string name="weibosdk_demo_openapi_invite_failed">发送邀请失败</string>
<string name="weibosdk_demo_access_token_is_empty">Access Token 不存在,请先登录</string>
<!-- scheme 调用 -->
<string name="goto_profile">查看某人主页面</string>
<string name="goto_home_message">进入微博主页消息页面</string>
<string name="goto_hot_weibo">进入热门微博</string>
<string name="goto_hot_topic">进入热门话题</string>
<string name="goto_send_weibo">进入发微薄页面</string>
<!-- 其它 -->
<string name="weibosdk_demo_launch_post_weibo">发送微博</string>
<string name="weibosdk_demo_launch_nearby_people">周边的人</string>
<string name="weibosdk_demo_launch_nearby_weibo">周边的微博</string>
<string name="weibosdk_demo_launch_user_info">个人资料</string>
<string name="weibosdk_demo_launch_page_info">位置(page)介绍面</string>
<string name="weibosdk_demo_launch_page_product_list">图书(page)产品列表</string>
<string name="weibosdk_demo_launch_page_user_list">位置用户列表</string>
<string name="weibosdk_demo_launch_page_weibo_list">位置微博列表</string>
<string name="weibosdk_demo_launch_page_photo_list">位置图片列表</string>
<string name="weibosdk_demo_launch_page_detail_info">位置详细资料页</string>
<string name="weibosdk_demo_launch_user_trends">话题列表</string>
<string name="weibosdk_demo_launch_weibo_browser">内置浏览器打开</string>
<string name="weibosdk_demo_launch_weibo_map">地图页面</string>
<string name="weibosdk_demo_launch_near_photo_list">xy周边热图</string>
<string name="weibosdk_demo_launch_poi_photo_list">poi周边热图</string>
<string name="weibosdk_demo_launch_poi_page">POI页面</string>
<string name="weibosdk_demo_launch_mblog_detail">查看微博正文</string>
<string name="weibosdk_demo_launch_qrcode">扫描二维码界面</string>
</resources>