0
我的網站使用YouTube API供用戶進行互動。 並非所有的,但幾個用戶名進入我的系統是不存在的渠道,我不知道如何檢測這個?某些用戶名顯示爲混亂的字符串! YouTube API AuthSub
它們是正確的長度,我只檢查字母數字字符串。舉個例子:
l3C9jpHV76COU9UHhWNneg
這裏是獲取帳戶的用戶名的代碼片段。大部分時間:這部分代碼沒有問題!
//User Profile Object
$userProfileEntry = $yt->getUserProfile('default');
//Get the username of the currently authed channel
$AuthedAccountName = (string)$userProfileEntry->getUsername();
啊!現在一切都說得通了!謝謝傑夫:) – 2013-04-10 11:12:40