如何检查 Instagram 用户名可用性
How to check Instagram username availability
如何检查用户名在 Instagram 中是否可用,我尝试使用 Get 请求并捕获 404 错误,但有时它不起作用,还有其他方法吗?一个可靠的?
我试过使用 object pascal
try
lHTTP.Get('http://instagram.com/'+lPath, TStream(nil));
except
on E: EIdHTTPProtocolException do
begin
if E.ErrorCode = 404 then
begin
TThread.Synchronize(nil,
procedure
begin
Form1.Memo2.Lines.Add(lPath);
Label2.Text:= IntTosTr(Memo2.Lines.Count);
end
);
end;
Exit;
end;
end;
但有时,当它 returns 404 我去检查用户是否存在于 instagram 中,但我找不到它并且我无法向用户注册,它说用户不可用!
是否有 instagram api 功能,我可以用它来检查用户是否有空?
我意识到有些账户被关闭了!如何区分它是关闭的还是已使用的还是可用的?
更新
我想这可能是答案,但我不确定如何在 delphi、How do I check if a username is taken with parse.com when all User ACL:Public read/write is disable?
中使用它
您的 API 调用示例包含错误。
当我尝试时
https://api.instagram.com/v1/users/search?q=rn0&access_token=xxxxxxxxxxxxxx
服务器回答
{"meta": {"error_type": "OAuthAccessTokenException", "code": 400,
"error_message": "The access_token provided is invalid."}}
因为我没有 access_token,我不能测试更多,但也许它可以让你开始
这很脏。使用这些说明自行完成代码
GET this url(获取 cookie)
POST再给这个url
这些值
- 推荐人:https://www.instagram.com/
- 新(自定义)header 命名为 "x-csrftoken",从您从 GET
收到的 cookie "csrftoken" 复制值
POST 值
- email=...一些随机的e-mail,instagram 上不存在...
- password=...一些强密码...
- 用户名=...你的名字...
- first_name=...空
如果可以创建帐户,您将得到这样的结果
{... "status": "ok", "username_suggestions": ["..."], "account_created": false}
或者如果不是这样
{..."status": "ok", "username_suggestions": ["..."], "errors": {"username": ["Sorry, that username is taken."]}, "account_created": false}
如何检查用户名在 Instagram 中是否可用,我尝试使用 Get 请求并捕获 404 错误,但有时它不起作用,还有其他方法吗?一个可靠的?
我试过使用 object pascal
try
lHTTP.Get('http://instagram.com/'+lPath, TStream(nil));
except
on E: EIdHTTPProtocolException do
begin
if E.ErrorCode = 404 then
begin
TThread.Synchronize(nil,
procedure
begin
Form1.Memo2.Lines.Add(lPath);
Label2.Text:= IntTosTr(Memo2.Lines.Count);
end
);
end;
Exit;
end;
end;
但有时,当它 returns 404 我去检查用户是否存在于 instagram 中,但我找不到它并且我无法向用户注册,它说用户不可用!
是否有 instagram api 功能,我可以用它来检查用户是否有空? 我意识到有些账户被关闭了!如何区分它是关闭的还是已使用的还是可用的?
更新
我想这可能是答案,但我不确定如何在 delphi、How do I check if a username is taken with parse.com when all User ACL:Public read/write is disable?
中使用它您的 API 调用示例包含错误。
当我尝试时
https://api.instagram.com/v1/users/search?q=rn0&access_token=xxxxxxxxxxxxxx
服务器回答
{"meta": {"error_type": "OAuthAccessTokenException", "code": 400,
"error_message": "The access_token provided is invalid."}}
因为我没有 access_token,我不能测试更多,但也许它可以让你开始
这很脏。使用这些说明自行完成代码
GET this url(获取 cookie)
POST再给这个url
这些值
- 推荐人:https://www.instagram.com/
- 新(自定义)header 命名为 "x-csrftoken",从您从 GET 收到的 cookie "csrftoken" 复制值
POST 值
- email=...一些随机的e-mail,instagram 上不存在...
- password=...一些强密码...
- 用户名=...你的名字...
- first_name=...空
如果可以创建帐户,您将得到这样的结果
{... "status": "ok", "username_suggestions": ["..."], "account_created": false}
或者如果不是这样
{..."status": "ok", "username_suggestions": ["..."], "errors": {"username": ["Sorry, that username is taken."]}, "account_created": false}