1
是否有方法通过http://instagram.com/username上的公开个人资料页面确定个人资料是私人还是公共个人资料?检查Instagram个人资料是否为私人身份而不进行身份验证
我知道有办法,但他们都需要CLIENT_ID,我不是在谈论。我需要一种方法来区分私人&公开个人资料,只是从个人资料网页的来源。
我不介意它是否需要将数据从Instagram中删除。
是否有方法通过http://instagram.com/username上的公开个人资料页面确定个人资料是私人还是公共个人资料?检查Instagram个人资料是否为私人身份而不进行身份验证
我知道有办法,但他们都需要CLIENT_ID,我不是在谈论。我需要一种方法来区分私人&公开个人资料,只是从个人资料网页的来源。
我不介意它是否需要将数据从Instagram中删除。
如果Instagram的个人资料并未公开,网页将包含这样的文字:“is_private”:真
因此,要确定是占私人没有client_id
做这样的事情:
$instagramPage = strip_tags(file_get_contents('http://instagram.com/raiym'));
if (strpos($instagramPage,'"is_private":true') !== false) {
return 'Account is private';
} else {
return 'Account is public';
}
或者你可以使用php库:https://github.com/raiym/instagram-php-scraper
$instagram = new Instagram();
$account = $instagram->getAccount('kevin');
if ($account->isPrivate) {
echo 'Account private';
} else {
echo 'Account public';
}