1

我试图弄清楚 SNAPI 是如何工作的(php 中 snapchat 的非官方 api)

所以这里是项目的github链接。

https://github.com/mgp25/SC-API

这里说。

Use registerTool.php https://github.com/mgp25/Snap-API/blob/master/examples/registerTool.php

Note: This is a CLI tool, not for webservers.

It will ask you for the account data:

Username: SnapTest

Password: thisIsMyPassword

Email: snaptest@myemail.com

Birthday (yyyy-mm-dd): 1970-01-01

我可以使用哪个 CLI 工具输入我自己的注册凭据?

因为这个php文件有这个代码

<?php

include_once("../src/snapchat.php");


echo "\n\nUsername: ";
$username = trim(fgets(STDIN));

echo "\nPassword: ";
$password = trim(fgets(STDIN));

echo "\nEmail: ";
$email = trim(fgets(STDIN));

echo "\nBirthday (yyyy-mm-dd): ";
$birthday = trim(fgets(STDIN));

echo "\nGmail address: ";
$gMail = trim(fgets(STDIN));

echo "\nGmail password: ";
$gPasswd = trim(fgets(STDIN));

echo "\nCasper key: ";
$casperKey = trim(fgets(STDIN));

echo "\nCasper secret: ";
$casperSecret = trim(fgets(STDIN));

$snapchat = new Snapchat($username, $gMail, $gPasswd, $casperKey, $casperSecret, true);

我对 PHP 和 API 完全陌生,我只是想弄清楚它是如何工作的。感谢您的帮助。

4

1 回答 1

0

1)安装XAMPP

2) 在你的 XAMPP 文件夹中找到 PHP.exe ("C:\xampp\php\php.exe")

3) 复制控制面板环境变量中的 PHP.exe 路径(如果您使用的是 Windows),在“PATH”部分。如果那里写了其他东西(对我来说是“C:\Ruby200-x64\bin”,你必须在它后面放一个分号“;”,然后是“C:\xampp\php”,它应该看起来像这样“ C:\Ruby200-x64\bin; C:\xampp\php")。4)所以现在我假设您在 Windows 中,打开命令提示符 CMD,然后使用命令“cd”导航到存在 registerTool.php 文件的文件夹。让我们假设它在桌面上的一个文件夹中。把这个放在CMD“cd Desktop\SnapchatApi\examples\”上,然后输入。

5) 现在是时候打开文件了。在 CMD "php registerTool.php" 上键入此命令,它将通过 CMD 运行脚本。

不知道有没有帮到你,这里有任何问题的答案。

于 2015-12-14T23:24:38.647 回答