user22028730
user22028730

Reputation: 1

Youtube Data API: How to get recent activity types .like .favorite and .subscription

We are playing with the Youtube data API and want to get the

snippet.typestring:
favorite
like subscription

however this only works for old subscriptions (3 years), no recent activity for likes and favorites

in general the connection works as we can get recent video uploads but not these types
favorite
like subscription

we tried connection through oauth and channelId + api key but had the same issues

we created the test account and made sure there is recent activity but nothing showed up

did anyone have experience with this or similar issues?

we used this https://youtube.googleapis.com/youtube/v3/activities?part=snippet&mine=true&access_token=[TOKEN] and https://youtube.googleapis.com/youtube/v3/activities?part=snippet&channelId=UCxlF-pLQQUAHZSixTqHiwDQ&key=[API_KEY]

Upvotes: 0

Views: 292

Answers (1)

PLuToNiuM
PLuToNiuM

Reputation: 72

Your url format is wrong. it should be like this:

$jsonrl:
"https://youtube.googleapis.com/youtube/v3/activities?part=contentDetails,snippet&channelId=channelidhere&key=apikey"

favorite, like, subscription You need to evaluate the videos separately for the subscription, and evaluate the channel id for the subscription. example:

$videocount= $jsonurl->items[0]->statistics->videoCount;
$subscriberCount=$jhandle2->$jsonurl-->statistics->subscriberCount;
$viewCount= $jsonurl-->items[0]->statistics->viewCount;

Youtube data viewer Demo: https://imageyoutube.com/

Upvotes: 0

Related Questions