ida*_*dan 3 android youtube-api google-api-java-client google-play-services
我尝试使用适用于 Android 项目的YouTube Direct Lite 应用程序上传视频https://code.google.com/p/ytd-android/
我执行了链接中提到的所有步骤。
该应用程序在我的 android 设备上运行良好,但我收到吐司“连接播放服务失败”和“发生内部错误”吐司。
和这个日志错误:
05-07 11:17:33.659: E/com.google.ytdl.UploadsListFragment(3140): Connection to Play Services Failed, error: 4, reason: ConnectionResult{statusCode=SIGN_IN_REQUIRED, resolution=PendingIntent{41836358: android.os.BinderProxy@41779308}}
Run Code Online (Sandbox Code Playgroud)
为了找出问题所在,我在这里生成了 api 密钥:
https://code.google.com/apis/console
Simple API Access
Use API keys to identify your project when you do not need to access user data. Learn more
Key for Android apps (with certificates)
API key:
xxxxxxxxxxxxxxxxxx
Android apps:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx;com.google.ytdl
Activated on: Apr 16, 2013 11:30 AM
Activated by: xxxxx@gmail.com – you
Run Code Online (Sandbox Code Playgroud)
它看起来不错。
我红色这些链接:https : //developers.google.com/+/mobile/android/sign-in http://developer.android.com/google/play-services/auth.html#choose
任何人都遇到过这个问题并知道是什么原因造成的?我唯一能想到的就是 api 密钥,但它似乎是正确的,帮助...
编辑:
访问令牌
mToken =
GoogleAuthUtil.getToken(MainActivity.this, mChosenAccountName, "oauth2:"
+ Scopes.PLUS_PROFILE + " " + YouTubeScopes.YOUTUBE + " "
+ YouTubeScopes.YOUTUBE_UPLOAD);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
19530 次 |
| 最近记录: |