PHPackages                             mehmetbeyhz/facebook-api - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. mehmetbeyhz/facebook-api

ActiveLibrary[API Development](/categories/api)

mehmetbeyhz/facebook-api
========================

Facebook rest api

2201PHP

Since Sep 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/mehmetbeyHZ/facebook-api)[ Packagist](https://packagist.org/packages/mehmetbeyhz/facebook-api)[ RSS](/packages/mehmetbeyhz-facebook-api/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Setup `composer require mehmetbeyhz/facebook-api:dev-master`

Login With Username and Password
--------------------------------

[](#login-with-username-and-password)

```
  require_once "vendor/autoload.php";
  $fb = new facebookAPI\Facebook();
  $login = $fb->login("username","password");
  $data = json_decode($login, true);
  $userInfo = $fb->userInfo($data['access_token']);
  print_r($userInfo);
```

Login With Device
-----------------

[](#login-with-device)

First check your app permission

[![GitHub Logo](/images/loginWithCode.png)](/images/loginWithCode.png)

```
require __DIR__.'/../vendor/autoload.php';
    $fb = new \facebookAPI\Facebook();
    $fb->setAppInfo("YOUR_APP_ID","YOUR_CLIENT_TOKEN");
    // $scopes = ['user_likes','public_profile'];  array tipinde facebook api izinleri içermelidir. $fb->createAppLoginCode($scopes)
    $scopes = ['user_likes','public_profile'];
    $create = $fb->createAppLoginCode($scopes);
    print_r($create); //JSON Format json_decode($create,true); is array format
    //isConfirmed token
    // 5 saniyede bir defa kontrol ettirilebilir.
    // Send 1 request in 5 seconds
    $codeControl = $fb->controlAppLoginCode("dfcb23cebc240adf91ed2b5a4f26042a");
    print_r($codeControl);
```

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/821b7190c25fce94a8094ea36b917c554bd8dd433657d3419411e4090f8d78d8?d=identicon)[mehmetbeyhz](/maintainers/mehmetbeyhz)

---

Top Contributors

[![mt-ks](https://avatars.githubusercontent.com/u/12996462?v=4)](https://github.com/mt-ks "mt-ks (12 commits)")

### Embed Badge

![Health badge](/badges/mehmetbeyhz-facebook-api/health.svg)

```
[![Health](https://phpackages.com/badges/mehmetbeyhz-facebook-api/health.svg)](https://phpackages.com/packages/mehmetbeyhz-facebook-api)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.3M7](/packages/exsyst-swagger)[hubspot/api-client

Hubspot API client

24015.5M18](/packages/hubspot-api-client)[pocketmine/bedrock-protocol

An implementation of the Minecraft: Bedrock Edition protocol in PHP

172437.8k11](/packages/pocketmine-bedrock-protocol)[botman/driver-telegram

Telegram driver for BotMan

94452.6k6](/packages/botman-driver-telegram)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
