【问题标题】:Snapchat API PHPSnapchat API PHP
【发布时间】:2015-12-14 22:39:51
【问题描述】:

我正在尝试弄清楚 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 完全陌生,我只是想弄清楚它是如何工作的。 非常感谢您的帮助。

【问题讨论】:

  • 在没有 Casper 客户端的情况下您的代码仍然可以工作吗?

标签: php snapchat


【解决方案1】:

1)安装 XAMPP

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

3) 将 PHP.exe 路径复制到控制面板中环境变量的“PATH”部分(如果您使用的是 Windows)。如果那里写了其他东西(对我来说是“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 运行脚本。

不知道有没有帮到你,有问题在这里回答。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多