Giter VIP home page Giter VIP logo

facebook-api's Introduction

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

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

First check your app permission

GitHub Logo

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);

facebook-api's People

Contributors

mt-ks avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

xaronnn

facebook-api's Issues

Like Problem

{
"error": {
"message": "(#200) Permissions error",
"type": "OAuthException",
"code": 200,
"fbtrace_id": "AKRDoQYSrUdDmdrQnuOYOfK"
}
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.