开发者

logging into youtube from android

开发者 https://www.devze.com 2023-01-17 21:35 出处:网络
I am trying t开发者_如何学Pythono log into you tube using the following code mService = new YouTubeService(\"Nothing\", developer_key);

I am trying t开发者_如何学Pythono log into you tube using the following code

mService = new YouTubeService("Nothing", developer_key);

//Authentication
try
{
   mService.setUserCredentials(mUsername, mPassword);
}
catch (AuthenticationException e)
{
   Log.v(TAG, e.toString());
}

but I am getting:

ConnectYouTube: com.google.gdata.util.AuthenticationException: Error connecting with login URI

This code seems pretty basic to me and I can't figure out what mistake am I making here.


Make sure you have to following permissions:

  • android.permission.INTERNET
  • android.permission.GET_ACCOUNTS
  • android.permission.USE_CREDENTIALS
  • android.permission.MANAGE_ACCOUNTS
0

精彩评论

暂无评论...
验证码 换一张
取 消