开发者

logging into youtube from android

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜