我试图弄清楚SNAPI是如何工作的(非官方的snapchat在php中的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完全陌生,我只是想弄清楚它是如何工作的。会很感激你的帮助。
发布于 2015-12-14 23:24:38
1)安装XAMPP
2)在XAMPP文件夹中找到PHP.exe ("C:\xampp\php\php.exe")
3)在控制面板中的环境变量上复制PHP.exe路径(如果您正在使用windows),在“路径”部分。如果有其他东西写在那里(对我来说是"C:\Ruby200-x64\bin“,您必须在它后面加上一个分号,然后是"C:\xampp\php”,它应该是“C:\Ruby200-x64\bin;C:\xampp\php")。4)现在假设您在Windows中,打开命令提示符CMD,然后使用命令"cd“导航到有registerTool.php文件的文件夹。让我们假设它位于桌面上的一个文件夹上。将它放在CMD“CMD\SnapchatApi\示例”上,然后输入。
5)现在是打开文件的时候了。在CMD "php registerTool.php“上输入这个命令,它将通过CMD运行脚本。
我不知道我是否帮了你,这里的任何问题的答案。
https://stackoverflow.com/questions/34277942
复制相似问题