作曲家安装Facebook Ads SDK PHP时出错

时间:2017-12-04 21:22:42

标签: php facebook sdk facebook-php-sdk

我正在尝试按照此处的教程安装Facbeook Ads API:Facebook Ads API SDK但是当我运行composer时出现以下错误:

composer update --lock

结果:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Can only install one of: facebook/php-ads-sdk[2.8.1, dev-master].
    - Can only install one of: facebook/php-ads-sdk[2.8.2, dev-master].
    - Installation request for facebook/php-ads-sdk dev-master -> satisfiable by facebook/php-ads-sdk[dev-master].
    - Installation request for facebook/php-ads-sdk 2.8.* -> satisfiable by facebook/php-ads-sdk[2.8.1, 2.8.2].

我的composer.json:

{
    "name": "facebook/php-ads-sdk",
    "description": "PHP SDK for Facebook ads",
    "type": "library",
    "license": "Facebook Platform",
    "keywords": [
      "facebook",
      "ads",
      "sdk"
    ],
    "homepage": "https://developers.facebook.com/",
    "require-dev" : {
        "phpunit/phpunit": "~4.6",
        "symfony/finder": "~2.6"
    },
    "require": {
        "facebook/php-ads-sdk": "2.8.*"
    },
    "autoload": {
        "psr-4": {
            "FacebookAds\\": "src/FacebookAds/"
        }
    }
}

如果我试图跑:

php composer.phar install --no-dev

结果:

Could not open input file: composer.phar

我正在搜索,但我找不到解决方案:(

谢谢!

1 个答案:

答案 0 :(得分:0)

尝试使用

import time
time.strftime('%H:%M')
'00:23'

如果有错误

尝试

php composer.phar update facebook/php-ads-sdk

而不是

composer install